< Back
Set-ZabbixUser
Post
NAME Set-ZabbixUser
SYNOPSIS
Set user properties
SYNTAX
Set-ZabbixUser [-UserID] <String> [[-UserGroupID] <Array>] [[-Alias] <String>] [[-Passwd] <String>] [[-Type]
<String>] [[-usrgrps] <Array>] [[-medias] <Array>] [[-mediaid] <String>] [[-mediatypeid] <String>] [[-Media]
<Array>] [[-RowsPerPage] <Int32>] [[-UserMediaActive] <String>] [[-UserMediaSendto] <String>]
[[-UserMediaSeverity] <Int32>] [[-UserMediaPeriod] <String>] [[-Name] <String>] [[-Surname] <String>]
[[-Autologin] <Int32>] [[-Autologout] <String>] [[-Theme] <String>] [[-Refresh] <String>] [[-Lang] <String>]
[[-UserDefaultURL] <String>] [[-matchMediatypeids] <Regex>] [[-jsonrpc] <String>] [[-session] <String>] [[-id]
<String>] [[-URL] <String>] [<CommonParameters>]
DESCRIPTION
PARAMETERS
-UserID <String>
UserID
Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-UserGroupID <Array>
GroupID user belongs to
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Alias <String>
User alias. Example: firstname.lastname
Required? false
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Passwd <String>
User password
Required? false
Position? 4
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Type <String>
Type of the user. Possible values: 1 - (default) Zabbix user; 2 - Zabbix admin; 3 - Zabbix super admin
Required? false
Position? 5
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-usrgrps <Array>
Required? false
Position? 6
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-medias <Array>
Required? false
Position? 7
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-mediaid <String>
Required? false
Position? 8
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-mediatypeid <String>
Unique global media type id
Required? false
Position? 9
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Media <Array>
Required? false
Position? 10
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-RowsPerPage <Int32>
GUI frontend: Rows per page in web browser
Required? false
Position? 11
Default value 0
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-UserMediaActive <String>
User media settings: Active. User media enabled=0/disabled=1
Required? false
Position? 12
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-UserMediaSendto <String>
User media settings: SendTo. Mostly email address
Required? false
Position? 13
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-UserMediaSeverity <Int32>
User media settings: Severity. Trigger severities: Default: 63
Required? false
Position? 14
Default value 0
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-UserMediaPeriod <String>
User media settings: Period. Example: "1-7,00:00-24:00"
Required? false
Position? 15
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Name <String>
User name
Required? false
Position? 16
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Surname <String>
User last name
Required? false
Position? 17
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Autologin <Int32>
GUI frontend: Possible values: 0 - (default) auto-login disabled; 1 - auto-login enabled
Required? false
Position? 18
Default value 0
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Autologout <String>
GUI frontend: User session life time. Accepts seconds and time unit with suffix. If set to 0s, the session
will never expire. Default: 15m
Required? false
Position? 19
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Theme <String>
GUI frontend: User's theme. Possible values: default - (default) system default; blue-theme - Blue; dark-theme
- Dark
Required? false
Position? 20
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Refresh <String>
GUI frontend: Automatic refresh period. Accepts seconds and time unit with suffix. Default: 30s
Required? false
Position? 21
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Lang <String>
Language code of the user's language. Default: en_GB.
Required? false
Position? 22
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-UserDefaultURL <String>
GUI frontend: URL of the page to redirect the user to after logging in
Required? false
Position? 23
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-matchMediatypeids <Regex>
Required? false
Position? 24
Default value
Accept pipeline input? false
Accept wildcard characters? false
-jsonrpc <String>
Required? false
Position? 25
Default value ($global:zabSessionParams.jsonrpc)
Accept pipeline input? false
Accept wildcard characters? false
-session <String>
Required? false
Position? 26
Default value ($global:zabSessionParams.session)
Accept pipeline input? false
Accept wildcard characters? false
-id <String>
Required? false
Position? 27
Default value ($global:zabSessionParams.id)
Accept pipeline input? false
Accept wildcard characters? false
-URL <String>
Required? false
Position? 28
Default value ($global:zabSessionParams.url)
Accept pipeline input? false
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:\\>Get-ZabbixUser | ? alias -eq "alias" | Set-ZabbixUser -Name NewName -Surname NewSurname -RowsPerPage 100
-UserGroupID 8 -Theme dark-theme
Set user properties
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ZabbixUser | ? alias -match "alias" | Set-ZabbixUser -Name NewName -Surname NewSurname -RowsPerPage 100
-UserGroupID 8 -Theme dark-theme
Same as above for multiple users
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-Zabbixuser | ? alias -match "alias" | Set-ZabbixUser -UserGroupID (Get-ZabbixUserGroup | ? name -match
disable).usrgrpid
Disable users (by moving him to user group Disabled)
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Get-ZabbixUser -getAccess | ? alias -match "user" | Set-ZabbixUser -Type 1
Set user type (Zabbix User - 1, Zabbix Admin - 2, Zabbix Super Admin - 3 )
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>Get-ZabbixUser -UserID 71 | Set-ZabbixUser -UserGroupID (Get-ZabbixUserGroup | ? name -match
"specialAccess|admin" | select usrgrpid)
Set user membership in user groups
-------------------------- EXAMPLE 6 --------------------------
PS C:\\>Get-ZabbixUser -UserID 71 | Set-Zabbixuser -UserGroupID (Get-ZabbixUserGroup | ? name -match
"specialAccess|admin").usrgrpid
Set user membership in user groups
-------------------------- EXAMPLE 7 --------------------------
PS C:\\>Get-ZabbixMediaType | select mediatypeid,type,description,status
Get list of media types
Get-ZabbixUser | ? alias -eq first.last | Set-Zabbixuser -UserMediaSendto new.email@example.com -UserMediaActive 0
-UserMediaSeverity 63 -mediatypeid 1 -UserGroupID 8,12
Set user media properties (user email address, severity, enabled=0/disabled=1) for mediatypeid 1 (Email) and
assign user to the user groups with ids 8 and 12
-------------------------- EXAMPLE 8 --------------------------
PS C:\\>Get-ZabbixUser | ? alias -eq first.last | Set-ZabbixUser -matchMediatypeids "8|4" -UserMediaSendto
first.last@domain.com -UserMediaSeverity 62
Set multiple medias (8 and 4) for one user
-------------------------- EXAMPLE 9 --------------------------
PS C:\\>Get-ZabbixUser | ? alias -eq first.last | Set-ZabbixUser -matchMediatypeids "" -UserMediaSendto
first.last@domain.com -UserMediaSeverity 63 -UserMediaActive 0
Set ALL! (careful) medias for user
RELATED LINKS
SYNOPSIS
Set user properties
SYNTAX
Set-ZabbixUser [-UserID] <String> [[-UserGroupID] <Array>] [[-Alias] <String>] [[-Passwd] <String>] [[-Type]
<String>] [[-usrgrps] <Array>] [[-medias] <Array>] [[-mediaid] <String>] [[-mediatypeid] <String>] [[-Media]
<Array>] [[-RowsPerPage] <Int32>] [[-UserMediaActive] <String>] [[-UserMediaSendto] <String>]
[[-UserMediaSeverity] <Int32>] [[-UserMediaPeriod] <String>] [[-Name] <String>] [[-Surname] <String>]
[[-Autologin] <Int32>] [[-Autologout] <String>] [[-Theme] <String>] [[-Refresh] <String>] [[-Lang] <String>]
[[-UserDefaultURL] <String>] [[-matchMediatypeids] <Regex>] [[-jsonrpc] <String>] [[-session] <String>] [[-id]
<String>] [[-URL] <String>] [<CommonParameters>]
DESCRIPTION
PARAMETERS
-UserID <String>
UserID
Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-UserGroupID <Array>
GroupID user belongs to
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Alias <String>
User alias. Example: firstname.lastname
Required? false
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Passwd <String>
User password
Required? false
Position? 4
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Type <String>
Type of the user. Possible values: 1 - (default) Zabbix user; 2 - Zabbix admin; 3 - Zabbix super admin
Required? false
Position? 5
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-usrgrps <Array>
Required? false
Position? 6
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-medias <Array>
Required? false
Position? 7
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-mediaid <String>
Required? false
Position? 8
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-mediatypeid <String>
Unique global media type id
Required? false
Position? 9
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Media <Array>
Required? false
Position? 10
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-RowsPerPage <Int32>
GUI frontend: Rows per page in web browser
Required? false
Position? 11
Default value 0
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-UserMediaActive <String>
User media settings: Active. User media enabled=0/disabled=1
Required? false
Position? 12
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-UserMediaSendto <String>
User media settings: SendTo. Mostly email address
Required? false
Position? 13
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-UserMediaSeverity <Int32>
User media settings: Severity. Trigger severities: Default: 63
Required? false
Position? 14
Default value 0
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-UserMediaPeriod <String>
User media settings: Period. Example: "1-7,00:00-24:00"
Required? false
Position? 15
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Name <String>
User name
Required? false
Position? 16
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Surname <String>
User last name
Required? false
Position? 17
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Autologin <Int32>
GUI frontend: Possible values: 0 - (default) auto-login disabled; 1 - auto-login enabled
Required? false
Position? 18
Default value 0
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Autologout <String>
GUI frontend: User session life time. Accepts seconds and time unit with suffix. If set to 0s, the session
will never expire. Default: 15m
Required? false
Position? 19
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Theme <String>
GUI frontend: User's theme. Possible values: default - (default) system default; blue-theme - Blue; dark-theme
- Dark
Required? false
Position? 20
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Refresh <String>
GUI frontend: Automatic refresh period. Accepts seconds and time unit with suffix. Default: 30s
Required? false
Position? 21
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Lang <String>
Language code of the user's language. Default: en_GB.
Required? false
Position? 22
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-UserDefaultURL <String>
GUI frontend: URL of the page to redirect the user to after logging in
Required? false
Position? 23
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-matchMediatypeids <Regex>
Required? false
Position? 24
Default value
Accept pipeline input? false
Accept wildcard characters? false
-jsonrpc <String>
Required? false
Position? 25
Default value ($global:zabSessionParams.jsonrpc)
Accept pipeline input? false
Accept wildcard characters? false
-session <String>
Required? false
Position? 26
Default value ($global:zabSessionParams.session)
Accept pipeline input? false
Accept wildcard characters? false
-id <String>
Required? false
Position? 27
Default value ($global:zabSessionParams.id)
Accept pipeline input? false
Accept wildcard characters? false
-URL <String>
Required? false
Position? 28
Default value ($global:zabSessionParams.url)
Accept pipeline input? false
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:\\>Get-ZabbixUser | ? alias -eq "alias" | Set-ZabbixUser -Name NewName -Surname NewSurname -RowsPerPage 100
-UserGroupID 8 -Theme dark-theme
Set user properties
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ZabbixUser | ? alias -match "alias" | Set-ZabbixUser -Name NewName -Surname NewSurname -RowsPerPage 100
-UserGroupID 8 -Theme dark-theme
Same as above for multiple users
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-Zabbixuser | ? alias -match "alias" | Set-ZabbixUser -UserGroupID (Get-ZabbixUserGroup | ? name -match
disable).usrgrpid
Disable users (by moving him to user group Disabled)
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Get-ZabbixUser -getAccess | ? alias -match "user" | Set-ZabbixUser -Type 1
Set user type (Zabbix User - 1, Zabbix Admin - 2, Zabbix Super Admin - 3 )
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>Get-ZabbixUser -UserID 71 | Set-ZabbixUser -UserGroupID (Get-ZabbixUserGroup | ? name -match
"specialAccess|admin" | select usrgrpid)
Set user membership in user groups
-------------------------- EXAMPLE 6 --------------------------
PS C:\\>Get-ZabbixUser -UserID 71 | Set-Zabbixuser -UserGroupID (Get-ZabbixUserGroup | ? name -match
"specialAccess|admin").usrgrpid
Set user membership in user groups
-------------------------- EXAMPLE 7 --------------------------
PS C:\\>Get-ZabbixMediaType | select mediatypeid,type,description,status
Get list of media types
Get-ZabbixUser | ? alias -eq first.last | Set-Zabbixuser -UserMediaSendto new.email@example.com -UserMediaActive 0
-UserMediaSeverity 63 -mediatypeid 1 -UserGroupID 8,12
Set user media properties (user email address, severity, enabled=0/disabled=1) for mediatypeid 1 (Email) and
assign user to the user groups with ids 8 and 12
-------------------------- EXAMPLE 8 --------------------------
PS C:\\>Get-ZabbixUser | ? alias -eq first.last | Set-ZabbixUser -matchMediatypeids "8|4" -UserMediaSendto
first.last@domain.com -UserMediaSeverity 62
Set multiple medias (8 and 4) for one user
-------------------------- EXAMPLE 9 --------------------------
PS C:\\>Get-ZabbixUser | ? alias -eq first.last | Set-ZabbixUser -matchMediatypeids "" -UserMediaSendto
first.last@domain.com -UserMediaSeverity 63 -UserMediaActive 0
Set ALL! (careful) medias for user
RELATED LINKS