Citrix Virtual Apps and Desktops SDK

Test-UserProfileShare

Tests a prospective user profile store path for its suitability for use with Citrix Profile Management.

Syntax

Test-UserProfileShare
    -Path <String>
    [-Mandatory]
    [-RedirectedFolders]
    -UserGroups <String[]>
    -AdminGroups <String[]>
    [<CommonParameters>]
<!--NeedCopy-->
Test-UserProfileShare
    -Path <String>
    [-Mandatory]
    [-RedirectedFolders]
    -UserGroupsSids <String[]>
    -AdminGroupsSids <String[]>
    [<CommonParameters>]
<!--NeedCopy-->
Test-UserProfileShare
    [-PathSyntaxOnly]
    -Path <String>
    [-Mandatory]
    [-RedirectedFolders]
    [<CommonParameters>]
<!--NeedCopy-->

Description

This command can be used as a validation step prior to configuring the profile store path in a production environment, in order to gain confidence that the profile manager and the store will function together correctly.

This command runs a sequence of tests on the nominated path, and reports the results via the output pipeline. The tests are organised into two distinct phases. The first phase examines the syntax of the supplied store path string. The second phase examines the profile store itself, checking that the required network shares exist, and that their permissions are appropriately configured according to best practices. If any faults are discovered with the syntax of the path string, these will be reported via the output pipeline, and the command will halt early without attempting to examine the profile store. The profile store will only be examined if the path is syntactically correct.

This command can be used in combination with the Repair-UserProfileShare cmdlet, which is able to automatically correct some of the problems that are found during inspection of the profile store. Problems with the syntax of the path can never be repaired. Syntactic issues must be fixed by the administrator re-typing the path and testing the store again.

Examples

EXAMPLE 1

This command tests that the path “\\ProfileServer\Profiles$\%USERAME%.%USERDOMAIN%” is suitable for use as a profile store. This path is syntactically valid, so the cmdlet will check for the existence of the share “\\ProfileServer\Profiles$”. Provided that the share exists, it will also check that its permissions are configured such that all domain users would be permitted to create profile folders within the store, and that all domain administrators will be permitted to access the store for administrative purposes.

C:PS> Test-UserProfileShare -Path \\ProfileServer\Profiles$\%USERNAME%.%USERDOMAIN% -UserGroups @("FABRIKAM\Domain Users") -AdminGroups @("FABRIKAM\Administrators")
<!--NeedCopy-->

EXAMPLE 2

This command tests that the path “\\ProfileServer\Profiles$\FinanceDept\FixedProfile” contains a valid Citrix mandatory profile. This path is syntactically valid, so the cmdlet will check that the share “\\ProfileServer\Profiles$” exists. If it exists, the cmdlet will go on to check that its permissions are configured such that all domain users would be permitted to read data from the profile, and that all domain administrators will be permitted to access the profile for administrative purposes.

Additional checks will be performed on the contents of the profile to ensure that there is nothing within the profile that might reveal details about the user who logged in to create it.

C:PS> Test-UserProfileShare -Path \\ProfileServer\Profiles$\FinanceDept\FixedProfile -UserGroups @("FABRIKAM\Domain Users") -AdminGroups @("FABRIKAM\Administrators") -Mandatory
<!--NeedCopy-->

Parameters

-PathSyntaxOnly

This switch indicates the the command should only check the syntax of the user store path.

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

-Path

This string contains the prospective profile store path to be examined, such as “\\ProfileServer\Profiles$\%USERNAME%.%USERDOMAIN%”.

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

-UserGroups

This array of strings specifies the names of security groups whose members will be creating their profiles in the store. This array must contain at least one entry. Each string must be specified as a Windows object identifier, such as “FABRIKAM\Domain Users”.

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

-AdminGroups

This array of strings specifies the names of security groups that should be given an administrative level of access to the profile share. If no such access is required, the array can be supplied as empty. Each string must be specified as a Windows object identifier, such as “FABRIKAM\Administrators”.

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

-UserGroupsSids

This array of strings specifies the SID of security groups whose members will be creating their profiles in the store. This array must contain at least one entry. Each string must be specified as security identifier string, such as “S-1-1-0”.

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

-AdminGroupsSids

This array of strings specifies the SID of security groups that should be given an administrative level of access to the profile share. If no such access is required, the array can be supplied as empty. Each string must be specified as security identifier string, such as “S-1-5-32-544”.

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

-Mandatory

This switch indicates whether the profile store is intended to house a mandatory profiles. Mandatory profile stores are subjected to additional checks.

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

-RedirectedFolders

This switch indicates whether the path indicates the location of redirected folder directories.

Type: SwitchParameter
Position: Named
Default value: None
Required: False
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

None

You can’t pipe objects to this cmdlet.

Outputs

PSObject

This cmdlet outputs a sequence of objects, each of which has the following properties:

Name - This property indicates the name of the test.

Status - This property indicates whether the test has passed or failed.

Details - This property provides additional information about the test in the case where it has failed. The interpretation of this property depends on the name of the test.

CanFix - In the case where the test has failed, this boolean property indicates whether the problem can be fixed with the Repair-UserProfileShare cmdlet.

Test-UserProfileShare