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>]
Detaillierte Beschreibung
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.
Parameter
-AppName<String>
Specifies the name of the installed Windows Store app to use for assigned access. Wildcard characters are accepted.
Aliasse |
Keiner |
Erforderlich? |
true |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
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.
Aliasse |
AUMID |
Erforderlich? |
true |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-UserName<String>
Specifies the local user account name to use for assigned access. This cannot be a domain account or an administrator account.
Aliasse |
Keiner |
Erforderlich? |
true |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
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.
Aliasse |
Keiner |
Erforderlich? |
true |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-Confirm
Sie werden vor dem Ausführen des Cmdlets zur Bestätigung aufgefordert.
Erforderlich? |
false |
Position? |
named |
Standardwert |
falsch |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-WhatIf
Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Erforderlich? |
false |
Position? |
named |
Standardwert |
falsch |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
<CommonParameters>
Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Eingaben
Der Eingabetyp ist der Typ der Objekte, die über die Pipeline an das Cmdlet übergeben werden können.
None.
You cannot pipe input to this cmdlet.
Ausgaben
Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.
- System.Object
Hinweise
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
Beispiele
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