< Back

Import-ZabbixConfiguration

Sun Jan 19, 2020 6:12 pm

NAME Import-ZabbixConfiguration



SYNOPSIS

Import configuration





SYNTAX

Import-ZabbixConfiguration [[-Path] <String>] [[-source] <String>] [[-Format] <String>] [[-jsonrpc] <String>]

[[-session] <String>] [[-id] <String>] [[-URL] <String>] [<CommonParameters>]





DESCRIPTION

Import configuration





PARAMETERS

-Path <String>



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-source <String>



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Format <String>

Format: XML (default) or JSON.



Required? false

Position? 3

Default value xml

Accept pipeline input? false

Accept wildcard characters? false



-jsonrpc <String>



Required? false

Position? 4

Default value ($global:zabSessionParams.jsonrpc)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-session <String>



Required? false

Position? 5

Default value ($global:zabSessionParams.session)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-id <String>



Required? false

Position? 6

Default value ($global:zabSessionParams.id)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-URL <String>



Required? false

Position? 7

Default value ($global:zabSessionParams.url)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Import-ZabbixConfig -Path c:\\zabbix-export-hosts.xml



Import hosts configuration









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>$inputFile = Get-Content c:\\zabbix-export-hosts.xml | Out-String



Import-ZabbixConfig -source $inputFile

Import hosts configuration









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Get-ZabbixHost | ? name -match host -pv hst | %{Export-ZabbixConfig -HostID $_.hostid | sc

c:\\ZabbixExport\\export-zabbix-host-$($hst.name).xml -Encoding UTF8}



dir c:\\ZabbixExport\\* | %{Import-ZabbixConfig $_.fullname}

Import hosts configuration











RELATED LINKS