| external help file | PSIGEL-help.xml |
|---|---|
| Module Name | PSIGEL |
| online version | https://github.com/IGEL-Community/PSIGEL/blob/master/Docs/Reference/Update-UMSDevice.md |
| schema | 2.0.0 |
Updates properties of a device.
Update-UMSDevice [-Computername] <String> [[-TCPPort] <Int32>] [[-ApiVersion] <Int32>]
[[-SecurityProtocol] <String[]>] [-WebSession] <Object> [-Id] <Int32> [[-Name] <String>] [[-Site] <String>]
[[-Department] <String>] [[-CostCenter] <String>] [[-LastIP] <String>] [[-Comment] <String>]
[[-AssetId] <String>] [[-InserviceDate] <String>] [[-SerialNumber] <String>] [[-DeviceAttributes] <Hashtable>] [-WhatIf] [-Confirm]
[<CommonParameters>]
Updates properties of a device via API.
Update property name of the device with ID 195 to 'NewName':
Update-UMSDevice -Computername 'igelrmserver' -WebSession $WebSession -Id 195 -Name 'NewName'
Message Id
------- --
Update successful. 195Update property name to 'Dev[MacAddress]' for all devices which name starts with 'V':
$PSDefaultParameterValues = @{
'*-UMS*:Credential' = (Get-Credential)
'*-UMS*:Computername' = 'igelrmserver'
'*-UMS*:Confirm' = $false
}
$PSDefaultParameterValues += @{
'*-UMS*:WebSession' = New-UMSAPICookie
}
(Get-UMSDevice -Filter details).where{$_.Name -match '^V'} |
ForEach-Object {
$_ | Update-UMSDevice -Name ('Dev{0}' -f $_.Mac)
}
Message Id
------- --
Update successful. 58
Update successful. 195Update the Value of the DeviceAttribute with the Identifier 'devattr1' on the device with ID 195 to 'NewValue' and remove the Value of the DeviceAttribute with the Identifier 'devattr2' from the device with ID 195:
Update-UMSDevice -Computername 'igelrmserver' -WebSession $WebSession -Id 195 -DeviceAttributes @{'devattr1' = 'NewValue'; 'devattr2' = ''}
Message Id
------- --
Update successful. 195API Version to use
Type: Int32
Parameter Sets: (All)
Aliases:
Accepted values: 3
Required: False
Position: Benannt
Default value: 3
Accept pipeline input: False
Accept wildcard characters: FalseDevice property asset ID
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseDevice property comment
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseComputername of the UMS Server
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseDevice property cost center
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseDevice property department
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseID of the device
Type: Int32
Parameter Sets: (All)
Aliases:
Required: True
Position: Benannt
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: FalseDevice property inservice date
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseDevice property last known IP address
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseDevice property name
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSet SSL/TLS protocol
Type: String[]
Parameter Sets: (All)
Aliases:
Accepted values: Tls12, Tls11, Tls, Ssl3
Required: False
Position: Benannt
Default value: Tls12
Accept pipeline input: False
Accept wildcard characters: FalseDevice property serial number
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseDevice property site
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseCustom Device Attributes
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseTCP Port API
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Benannt
Default value: 8443
Accept pipeline input: False
Accept wildcard characters: FalseWebsession Cookie
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.