Search Results for

    Show / Hide Table of Contents

    Set-UscClientServiceUser

    SYNOPSIS

    Sets a user to run the client service.

    SYNTAX

    Custom User (Default)

    Set-UscClientServiceUser -Credential <PSCredential> [-Directory <String>] [<CommonParameters>]
    

    Default User

    Set-UscClientServiceUser [-UseDefaultUser] [-CreateDefaultUser] [-Directory <String>] [<CommonParameters>]
    

    DESCRIPTION

    Use the Set-UscClientServiceUser cmdlet to specify a user to run the client service, either an existing Windows user or a default user.

    EXAMPLES

    Example 1

    PS C:\> Set-UscClientServiceUser -Credential (Get-Credential)
    

    This example will prompt a dialog to specify the user, which will be set as the service user.

    Example 2

    PS C:\> Set-UscClientServiceUser -UseDefaultUser
    

    This example will assign the default user (UpdateServiceUser) when the client service is installed. If it's already installed, it will be created and assigned immediately.

    Example 3

    PS C:\> Set-UscClientServiceUser -UseDefaultUser -CreateDefaultUser
    

    This example will immediately create the default user, but only assign him to the service during installation. If it's already installed he will be assigned immediately.

    PARAMETERS

    -CreateDefaultUser

    Creates the default user UpdateServiceUser. The default user is created during the client service installation.

    Type: SwitchParameter
    Parameter Sets: Default User
    Aliases:
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Credential

    Specifies user credentials for Windows service. The user must exists and have administrator privileges on the machine.

    Type: PSCredential
    Parameter Sets: Custom User
    Aliases:
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Directory

    Specifies an optional alternative client directory.

    Type: String
    Parameter Sets: (All)
    Aliases:
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -UseDefaultUser

    Specifies to use the default user UpdateServiceUser, which is created automatically when the client service is installed. This user is given Administrator privileges with random password which is not stored.

    Type: SwitchParameter
    Parameter Sets: Default User
    Aliases:
    
    Required: True
    Position: Named
    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

    None

    OUTPUTS

    System.Object

    NOTES

    If specifying a user other then the default, the password is stored on the machine encrypted. Running the cmdlet before installing the service client will not result in creating the default user (UpdateServiceUser). Running after the client service is installed, will assign the specified user to the windows service and restart it.

    RELATED LINKS

    In This Article
    Back to top Generated by DocFX