Get-SCSharedResource

Gets resources that are shared with a self-service user or a self-service user role.

Description

The Get-SCSharedResource gets resources that are shared with a self-service user or a self-service user role.

For more information about Get-SCSharedResource, type: "Get-Help Get-SCSharedResource -online".

Parameters

UserName

Required? false
Accept Pipeline Input? false
Position? named
Specifies a the name of a user. Enter a user name with the format Domain\User.

UserRole

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a user role object.

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Examples

1: Get all resources that are shared with a specific self-service user.
PS C:\> Get-SCSharedResource -UserName "Contoso\Katarina"


This command returns all resources that are shared to the user named Katarina. 
2: Get all resources that are shared with a specific self-service user role.
PS C:\> $Role = Get-SCUserRole -Name "ContosoSelfServiceUsers"
PS C:\> Get-SCSharedResource -UserRole $Role
The first command gets the user role object named ContosoSelfServiceUsers and stores the object in the $Role variable.

The second command returns the resources that are shared to the user role stored in $Role (ContosoSelfServiceUsers).
3: Get all resources that are shared with a specific user in a specific user role.
PS C:\> $Role = Get-SCUserRole -Name "ContosoSelfServiceUsers"
PS C:\> Get-SCSharedResource -UserName "Contoso\Katarina" -UserRole $Role
The first command gets the user role object named ContosoSelfServiceUsers and stores the object in the $Role variable.

The second command returns the resources that are shared with the user named Katarina in the user role stored in $Role (ContosoSelfServiceUsers).

See Also