Share via


Set-AssignedAccess

Set-AssignedAccess

Configures a user to launch only one app.

Sintassi

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>]

Descrizione dettagliata

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.

Parametri

-AppName<String>

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

Alias

nessuno

Obbligatorio?

true

Posizione?

named

Valore predefinito

nessuno

Accetta input da pipeline?

false

Accetta caratteri jolly?

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.

Alias

AUMID

Obbligatorio?

true

Posizione?

named

Valore predefinito

nessuno

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-UserName<String>

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

Alias

nessuno

Obbligatorio?

true

Posizione?

named

Valore predefinito

nessuno

Accetta input da pipeline?

false

Accetta caratteri jolly?

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.

Alias

nessuno

Obbligatorio?

true

Posizione?

named

Valore predefinito

nessuno

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-Confirm

Richiede conferma prima di eseguire il cmdlet.

Obbligatorio?

false

Posizione?

named

Valore predefinito

False

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

-WhatIf

Mostra gli effetti dell'esecuzione del cmdlet. Il cmdlet non viene eseguito.

Obbligatorio?

false

Posizione?

named

Valore predefinito

False

Accetta input da pipeline?

false

Accetta caratteri jolly?

false

<CommonParameters>

Questo cmdlet supporta i parametri comuni: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer e -OutVariable. Per altre informazioni, vedere   about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Input

Il tipo di input è il tipo degli oggetti che è possibile reindirizzare al cmdlet.

  • None.

    You cannot pipe input to this cmdlet.

Output

Il tipo di output corrisponde al tipo di oggetti generati dal cmdlet.

  • System.Object

Note

  • 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

Esempi

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

Argomenti correlati

Get-AssignedAccess

Clear-AssignedAccess