Skip to content

Latest commit

 

History

History
217 lines (167 loc) · 3.98 KB

Update-UMSDeviceDirectory.md

File metadata and controls

217 lines (167 loc) · 3.98 KB
external help file Module Name online version schema
PSIGEL-help.xml
PSIGEL
2.0.0

Update-UMSDeviceDirectory

SYNOPSIS

Updates the name of a device directory.

SYNTAX

Update-UMSDeviceDirectory [-Computername] <String> [[-TCPPort] <Int32>] [[-ApiVersion] <Int32>]
 [[-SecurityProtocol] <String[]>] [-WebSession] <Object> [-Id] <Int32> [-Name] <String> [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

Updates the name of a device directory via API.

EXAMPLES

Example 1

Update property name of device directory with ID 664 to 'NewName':

Update-UMSDeviceDirectory -Computername 'igelrmserver' -WebSession $WebSession -Id 664 -Name 'NewName'

Message                          Id
-------                          --
Updated directory successfully. 664

Example 2

Update property name of all device directories with parent ID 71 to add '01' to their existing names:

$PSDefaultParameterValues = @{
  '*-UMS*:Credential'   = (Get-Credential)
  '*-UMS*:Computername' = 'igelrmserver'
  '*-UMS*:Confirm'      = $false
}
$PSDefaultParameterValues += @{
  '*-UMS*:WebSession' = New-UMSAPICookie
}

(Get-UMSDeviceDirectory).where{$_.ParentId -eq 71} |
  ForEach-Object {
  $_ | Update-UMSDeviceDirectory -Name ('{0}01' -f $_.Name)
}

Message                          Id
-------                          --
Updated directory successfully. 664
Updated directory successfully. 665

PARAMETERS

-ApiVersion

API Version to use

Type: Int32
Parameter Sets: (All)
Aliases:
Accepted values: 3

Required: False
Position: 2
Default value: 3
Accept pipeline input: False
Accept wildcard characters: False

-Computername

Computername of the UMS Server

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

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

ID of the device directory

Type: Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name

Device property name

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SecurityProtocol

Set SSL/TLS protocol

Type: String[]
Parameter Sets: (All)
Aliases:
Accepted values: Tls12, Tls11, Tls, Ssl3

Required: False
Position: 3
Default value: Tls12
Accept pipeline input: False
Accept wildcard characters: False

-TCPPort

TCP Port API

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: 8443
Accept pipeline input: False
Accept wildcard characters: False

-WebSession

Websession Cookie

Type: Object
Parameter Sets: (All)
Aliases:

Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.Int32

System.String

OUTPUTS

System.Object

NOTES

RELATED LINKS