Add-SCUserRolePermission

Adds a permission to a user role.

Syntax

Add-SCUserRolePermission
   [-VMMServer <ServerConnection>]
   -UserRole <SelfServiceUserRole>
   -Cloud <Cloud>
   [-AllowLocalAdmin]
   [-Checkpoint]
   [-CheckpointRestoreOnly]
   [-DeployFromTemplateOnly]
   [-Deploy]
   [-PauseAndResume]
   [-RemoteConnect]
   [-Remove]
   [-Save]
   [-Shutdown]
   [-Start]
   [-Stop]
   [-Store]
   [-DeployShielded]
   [-MigrateVM]
   [-UpdateVMFunctionalLevel]
   [-ManageAzureProfiles]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Add-SCUserRolePermission
   [-VMMServer <ServerConnection>]
   -UserRole <SelfServiceUserRole>
   [-AllowLocalAdmin]
   [-Author]
   [-AuthorVMNetwork]
   [-CanShare]
   [-CanReceive]
   [-Checkpoint]
   [-CheckpointRestoreOnly]
   [-DeployFromTemplateOnly]
   [-Deploy]
   [-PauseAndResume]
   [-RemoteConnect]
   [-Remove]
   [-Save]
   [-Shutdown]
   [-Start]
   [-Stop]
   [-Store]
   [-DeployShielded]
   [-MigrateVM]
   [-UpdateVMFunctionalLevel]
   [-ManageAzureProfiles]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Add-SCUserRolePermission
   -UserRole <SelfServiceUserRole>
   -HostGroup <HostGroup>
   [-VMMServer <ServerConnection>]
   [-AllowLocalAdmin]
   [-Checkpoint]
   [-CheckpointRestoreOnly]
   [-DeployFromTemplateOnly]
   [-Deploy]
   [-PauseAndResume]
   [-RemoteConnect]
   [-Remove]
   [-Save]
   [-Shutdown][-Start]
   [-Stop]
   [-Store]
   [-DeployShielded]
   [-MigrateVM]
   [-UpdateVMFunctionalLevel]
   [-ManageAzureProfiles]
   [-RunAsynchronously]
   [-PROTipID <guid>]
   [-JobVariable <string>]
   [-OnBehalfOfUser <string>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Add-SCUserRolePermission
   [-VMMServer <ServerConnection>]
   [-Cloud <Cloud>]
   -JobGroup <Guid>
   [-AllowLocalAdmin]
   [-Author]
   [-AuthorVMNetwork]
   [-CanShare]
   [-CanReceive]
   [-Checkpoint]
   [-CheckpointRestoreOnly]
   [-DeployFromTemplateOnly]
   [-Deploy]
   [-PauseAndResume]
   [-RemoteConnect]
   [-Remove]
   [-Save]
   [-Shutdown]
   [-Start]
   [-Stop]
   [-Store]
   [-DeployShielded]
   [-MigrateVM]
   [-UpdateVMFunctionalLevel]
   [-ManageAzureProfiles]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Add-SCUserRolePermission
   [-VMMServer <ServerConnection>]
   [-HostGroup <HostGroup>]
   -JobGroup <Guid>
   [-AllowLocalAdmin]
   [-Author]
   [-AuthorVMNetwork]
   [-CanShare]
   [-CanReceive]
   [-Checkpoint]
   [-CheckpointRestoreOnly]
   [-DeployFromTemplateOnly]
   [-Deploy]
   [-PauseAndResume]
   [-RemoteConnect]
   [-Remove]
   [-Save]
   [-Shutdown]
   [-Start]
   [-Stop]
   [-Store]
   [-DeployShielded]
   [-MigrateVM]
   [-UpdateVMFunctionalLevel]
   [-ManageAzureProfiles]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Add-SCUserRolePermission
   [-VMMServer <ServerConnection>]
   -UserRolePermission <UserRolePermission>
   [-AllowLocalAdmin]
   [-Checkpoint]
   [-CheckpointRestoreOnly]
   [-DeployFromTemplateOnly]
   [-Deploy]
   [-PauseAndResume]
   [-RemoteConnect]
   [-Remove]
   [-Save]
   [-Shutdown]
   [-Start]
   [-Stop]
   [-Store]
   [-DeployShielded]
   [-MigrateVM]
   [-UpdateVMFunctionalLevel]
   [-ManageAzureProfiles]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]

Description

The Add-SCUserRolePermission cmdlet grants a permission to a user role.

Note

  • The parameter HostGroup can be used only when the UserRole parameter is VMAdmin.
  • MigrateVM and UpdateVMFunctionalLevel permissions are available only to VMAdmin user role.
  • ManageAzureProfiles permission is available to all user roles.

Parameters

-AllowLocalAdmin

Indicates that this cmdlet grants the Allow Local Admin permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Author

Indicates that this cmdlet grants the Author permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AuthorVMNetwork

Indicates that this cmdlet grants the Author VMNetwork permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CanReceive

Indicates that this cmdlet grants the Can Receive permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CanShare

Indicates that this cmdlet grants the Can Share permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Checkpoint

Indicates that this cmdlet grants the Can Checkpoint permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CheckpointRestoreOnly

Indicates that this cmdlet grants the Can Checkpoint Restore Only permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Cloud

Specifies a private cloud object for which this cmdlet modifies a user role.

Type:Cloud
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Deploy

Indicates that this cmdlet grants the Deploy virtual machine permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeployFromTemplateOnly

Indicates that this cmdlet grants the Deploy From Template Only virtual machine permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeployShielded

Indicates that this cmdlet grants the Deploy Shielded permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HostGroup

Specifies a host group object for which this cmdlet modifies a user role.

Type:HostGroup
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-JobGroup

Specifies an identifier for a series of commands that runs as a set just before the final command that includes the same job group identifier runs.

Type:Guid
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

Specifies a variable in which job progress is tracked and stored.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ManageAzureProfiles

Indicates that this cmdlet grants the Manage Azure profiles permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MigrateVM

Indicates that this cmdlet grants the Migrate Virtual Machine permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OnBehalfOfUserRole

Specifies a user role. To obtain a user role, use the Get-SCUserRole cmdlet. This cmdlet operates on behalf of the user role that this parameter specifies.

Type:UserRole
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PauseAndResume

Indicates that this cmdlet grants the Can Pause And Resume permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RemoteConnect

Indicates that this cmdlet grants the Remote Connect permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Remove

Indicates that this cmdlet grants the Can Remove permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Save

Indicates that this cmdlet grants the Can Save VM permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Shutdown

Indicates that this cmdlet grants the Can Shutdown virtual machine permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Start

Indicates that this cmdlet grants the Can Start virtual machine permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Stop

Indicates that this cmdlet grants the Can Stop virtual machine permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Store

Indicates that this cmdlet grants the Can Store virtual machine permission.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UpdateVMFunctionalLevel

Indicates that this cmdlet grants the permission to update virtual machine functional level.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UserRole

Specifies a user role to which this cmdlet adds permissions.

Type:SelfServiceUserRole
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-UserRolePermission

Specifies a UserRolePermission to which this cmdlet adds permissions. To obtain a user role permission, use the Get-SCUserRolePermission cmdlet.

Type:UserRolePermission
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VMMServer

Specifies a Virtual Machine Manager (VMM) server on which this cmdlet modifies a user role.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Outputs

UserRole

This cmdlet returns a UserRole object.