Citrix Virtual Apps and Desktops SDK

Set-AdminAdministrator

Sets the properties of an administrator.

Syntax

Set-AdminAdministrator
   [-InputObject] <Administrator[]>
   [-Enabled <Boolean>]
   [-PassThru]
   [-LoggingId <Guid>]
   [-SkipCertificateValidation]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->
Set-AdminAdministrator
   -Sid <String[]>
   [-Enabled <Boolean>]
   [-PassThru]
   [-LoggingId <Guid>]
   [-SkipCertificateValidation]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->
Set-AdminAdministrator
   [-Name] <String[]>
   [-Enabled <Boolean>]
   [-PassThru]
   [-LoggingId <Guid>]
   [-SkipCertificateValidation]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->

Description

The Set-AdminAdministrator cmdlet is used to enable or disable an existing administrator.

You can specify the administrators to modify in a number of ways, by piping in existing objects, by passing existing objects with the InputObject parameter, or by specifying the names or SIDs explicitly.

Examples

EXAMPLE 1

Enable all administrators that are currently disabled.

Get-AdminAdministrator -Enabled $false | Set-AdminAdministrator -Enabled $true
<!--NeedCopy-->

EXAMPLE 2

Enable two specific users specified by name (TestUser1 and TestUser2).

Set-AdminAdministrator -Name DOMAIN\TestUser1,DOMAIN\TestUser2 -Enabled $true
<!--NeedCopy-->

Parameters

-Sid

Specifies the SIDs of the administrators to modify.

Type: String[]
Position: Named
Default value: None
Required: True
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject

Specifies the administrators to modify.

Type: Administrator[]
Position: 2
Default value: None
Required: True
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name

Specifies the names of the administrators to modify.

Type: String[]
Position: 2
Default value: None
Required: True
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Enabled

Specifies the new value for the Enabled property.

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-PassThru

Returns the affected record. By default, this cmdlet does not generate any output.

Type: SwitchParameter
Position: Named
Default value: False
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-LoggingId

Specifies the identifier of the high-level operation this cmdlet call forms a part of. Citrix Studio and Director typically create high-level operations. PowerShell scripts can also wrap a series of cmdlet calls in a high-level operation by way of the Start-LogHighLevelOperation and Stop-LogHighLevelOperation cmdlets.

Type: Guid
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SkipCertificateValidation

Forces the cmdlet to skip checking SSL certificates. By default, the cmdlet will check the certificate from the server. If the certificate is not valid, the cmdlet will not connect to the server.

Type: SwitchParameter
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False
Introduced in: Citrix Virtual Apps and Desktop 7 2511

CitrixCommonParameters

This cmdlet supports the common Citrix parameters: -AdminAddress, -AdminClientIP, -BearerToken, -TraceParent, -TraceState and -VirtualSiteId. For more information, see about_CitrixCommonParameters.

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

Citrix.DelegatedAdmin.Sdk.Administrator

You can pipe the adminstrators to be modified into this command.

Outputs

None or Citrix.DelegatedAdmin.Sdk.Administrator

When you use the PassThru parameter, Set-AdminAdministrator generates a Citrix.DelegatedAdmin.Sdk.Administrator object. Otherwise, this cmdlet does not generate any output.

Set-AdminAdministrator