Set-AssignedAccess

Set-AssignedAccess

Configures a user to launch only one app.

Syntax

Parameter Set: UserNameANDAppName
Set-AssignedAccess -AppName <String> -UserName <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: UserNameANDAppId
Set-AssignedAccess -AppUserModelId <String> -UserName <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: UserSidANDAppId
Set-AssignedAccess -AppUserModelId <String> -UserSID <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: UserSidANDAppName
Set-AssignedAccess -AppName <String> -UserSID <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Set-AssignedAccess cmdlet configures the specified user account so that it can use only one Windows Store app. The user cannot exit the app, sign out, or access any system settings.

If a user is signed in or the PC has a PS/2 keyboard, you must restart the computer to apply the changes.

To sign out of assigned access, quickly press the left Windows logo key five times.

Parameters

-AppName<String>

Specifies the name of the installed Windows Store app to use for assigned access. Wildcard characters are accepted.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

true

-AppUserModelId<String>

Specifies the Application User Model ID (AppUserModelID) for the installed Windows Store app to use for assigned access. The AppUserModelID is found in the app's AUMIDs.txt file.

Aliases

AUMID

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UserName<String>

Specifies the local user account name to use for assigned access. This cannot be a domain account or an administrator account.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UserSID<String>

Specifies the security identifier (SID) for the local user account to use for assigned access. This account cannot be a domain account or an administrator account.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None.

    You cannot pipe input to this cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • System.Object

Notes

  • To get a list of all the Windows Store apps installed for a user account, use the Get-AppxPackage cmdlet as follows:

    Get-AppxPackage -User username

Examples

EXAMPLE 1

This example shows how to configure assigned access by using the user SID and the app name.

PS C:\> Set-AssignedAccess -UserSID S-1-5-21-523423449-2432423479-234123443-1004 -AppName CustomApp

EXAMPLE 2

This example shows how to configure assigned access by using the user name and AppUserModelID.

PS C:\> Set-AssignedAccess -UserName UserName -AUMID microsoft.windowsphotos_8wekyb3d8bbwe!app

Get-AssignedAccess

Clear-AssignedAccess