external help file | Module Name | online version | schema |
---|---|---|---|
PSIGEL-help.xml |
PSIGEL |
2.0.0 |
Removes a device.
Remove-UMSDevice [-Computername] <String> [[-TCPPort] <Int32>] [[-ApiVersion] <Int32>]
[[-SecurityProtocol] <String[]>] [-WebSession] <Object> [-Id] <Int32> [-WhatIf] [-Confirm]
[<CommonParameters>]
Remove-UMSDevice [-Computername] <String> [[-TCPPort] <Int32>] [[-ApiVersion] <Int32>]
[[-SecurityProtocol] <String[]>] [-WebSession] <Object> [-Id] <Int32> [-Online] [-WhatIf] [-Confirm]
[<CommonParameters>]
Removes a device completely (without recycle bin) via API. Per default the device is removed even if it is offline. With the switch "Online" it removes it only if it is online.
Remove device with ID 754 offline:
Remove-UMSDevice -Computername 'igelrmserver' -WebSession $WebSession -Id 754
Bestätigung
Möchten Sie diese Aktion wirklich ausführen?
Ausführen des Vorgangs "Remove-UMSDevice" für das Ziel "Id: 754".
[J] Ja [A] Ja, alle [N] Nein [K] Nein, keine [H] Anhalten [?] Help (default is "Ja"):
Message Id
------- --
Offline deletion successful. 754
Remove device with ID 195 online:
Remove-UMSDevice -Computername 'igelrmserver' -WebSession $WebSession -Id 195 -Online
Bestätigung
Möchten Sie diese Aktion wirklich ausführen?
Ausführen des Vorgangs "Remove-UMSDevice" für das Ziel "Id: 195".
[J] Ja [A] Ja, alle [N] Nein [K] Nein, keine [H] Anhalten [?] Help (default is "Ja"):
Message : OK.
Id : 195
ExecId : ID-IGELRMSERVER-50980-1552032799145-17-0
Mac :
ExecTime : 0
State : SUCCESS
Remove devices with names starting with "V" and ending with "02" or "03" offline, disabling confirmation:
$PSDefaultParameterValues = @{
'*-UMS*:Credential' = (Get-Credential)
'*-UMS*:Computername' = 'igelrmserver'
'*-UMS*:Confirm' = $false
}
$PSDefaultParameterValues += @{
'*-UMS*:WebSession' = New-UMSAPICookie
}
(Get-UMSDevice).where{$_.Name -match '^V.+(02|03)$'} |
Remove-UMSDevice
Message Id
------- --
Offline deletion successful. 749
Offline deletion successful. 750
Offline deletion successful. 751
Offline deletion successful. 752
API 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: False
Computername of the UMS Server
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts 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: False
ID 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: False
Switch to remove the device only if it is online
Type: SwitchParameter
Parameter Sets: Online
Aliases:
Required: False
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Set 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: False
TCP Port API
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Benannt
Default value: 8443
Accept pipeline input: False
Accept wildcard characters: False
Websession Cookie
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: Benannt
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows 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: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.