Citrix Daas SDK

Test-HypHostingUnit

Checks to ensure that the Hosting Unit has the required permission.

Syntax

Test-HypHostingUnit
    -HostingUnitName <String>
    [-PermissionType <String[]>]
    [-UserName <String>]
    [-SecurePassword <SecureString>]
    [-AdminCredentials <PSCredential>]
    [-CustomProperties <String>]
    [<CitrixCommonParameters>]
    [<CommonParameters>]
<!--NeedCopy-->
Test-HypHostingUnit
    -HostingUnitUid <Guid>
    [-PermissionType <String[]>]
    [-UserName <String>]
    [-SecurePassword <SecureString>]
    [-AdminCredentials <PSCredential>]
    [-CustomProperties <String>]
    [<CitrixCommonParameters>]
    [<CommonParameters>]
<!--NeedCopy-->

Description

Use this command to check that the Hosting Unit has the required permissions. This check is done based on the hypervisor connection type, as each hypervisor will have their set of attributes for authentication.

Examples

EXAMPLE 1

This command checks the permissions for the given Hosting Unit, using the HostingUnit GUID. A SecurePassword can be generated using Get-Credential.

$result = Test-HypHostingUnit -HostingUnitUid "your_guid" -UserName "yourusername" -SecurePassword "yourpassword_as_securestring"
<!--NeedCopy-->

EXAMPLE 2

This command checks the permissions for the given Hosting Unit, using the Hosting Unit Name. A SecurePassword can be generated using Get-Credential.

$result = Test-HypHostingUnit -HostingUnitName "yourhostingunit" -UserName "yourusername" -SecurePassword "yourpassword_as_securestring"
<!--NeedCopy-->

Parameters

-HostingUnitName

Hosting Unit Name

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

-HostingUnitUid

Hosting Unit GUID

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

-PermissionType

Permission Types to check for

Type: String[]
Accepted values: Browse, Lifecycle, PowerManagement
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-UserName

UserName for Administrator account in Hypervisor

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

-SecurePassword

Password for Administrator account in Hypervisor

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

-AdminCredentials

Hypervisor Administrator credentials object

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

-CustomProperties

Custom properties for the connection

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

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

None

You can’t pipe objects to this cmdlet.

Outputs

HostingUnitTestResult>

An array of HypervisorConnectionTestResult which contains missing permissions, corrective action and the category with the description.

Notes

In the case of failure, we are given direction for corrective action and what permissions are missing.

Category CorrectiveAction MissingPermissions


PowerManagement Add missing permissions to the user:MyUser Permission1:FALSE,Permission2:TRUE…

Test-HypHostingUnit