Add-SCUserRolePermission
将权限添加到用户角色。
语法
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>]
说明
Add-SCUserRolePermission cmdlet 授予用户角色的权限。
注意
- 参数 HostGroup 只能在 UserRole 参数为 VMAdmin 时使用。
- MigrateVM 和 UpdateVMFunctionalLevel 权限仅适用于 VMAdmin 用户角色。
- ManageAzureProfiles 权限可用于所有用户角色。
参数
-AllowLocalAdmin
指示此 cmdlet 授予“允许本地管理员”权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Author
指示此 cmdlet 授予 Author 权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AuthorVMNetwork
指示此 cmdlet 授予 Author VMNetwork 权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CanReceive
指示此 cmdlet 授予 Can Receive 权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CanShare
指示此 cmdlet 授予 Can Share 权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Checkpoint
指示此 cmdlet 授予 Can Checkpoint 权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CheckpointRestoreOnly
指示此 cmdlet 授予“仅检查点还原”权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Cloud
指定此 cmdlet 修改用户角色的私有云对象。
Type: | Cloud |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Deploy
指示此 cmdlet 授予“部署虚拟机”权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeployFromTemplateOnly
指示此 cmdlet 仅授予“仅从模板部署”虚拟机权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeployShielded
指示此 cmdlet 授予 Deploy Shielded 权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HostGroup
指定此 cmdlet 修改用户角色的主机组对象。
Type: | HostGroup |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobGroup
指定一系列命令的标识符,这些命令在包含同一作业组标识符运行的最后一个命令之前作为集运行。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
指定在其中跟踪和存储作业进度的变量。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ManageAzureProfiles
指示此 cmdlet 授予 “管理 Azure 配置文件 ”权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MigrateVM
指示此 cmdlet 授予 Migrate 虚拟机 权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUser
指定用户名。 此 cmdlet 代表此参数指定的用户运行。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUserRole
指定用户角色。 若要获取用户角色,请使用 Get-SCUserRole cmdlet。 此 cmdlet 代表此参数指定的用户角色运行。
Type: | UserRole |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PauseAndResume
指示此 cmdlet 授予“可暂停和恢复”权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
指定触发此操作 (PRO 提示) 的性能和资源优化提示的 ID。 此参数允许审核 PRO 提示。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoteConnect
指示此 cmdlet 授予 Remote Connect 权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Remove
指示此 cmdlet 授予 Can Remove 权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
指示作业异步运行,以便控件立即返回到命令 shell。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Save
指示此 cmdlet 授予 Can Save VM 权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Shutdown
指示此 cmdlet 授予 Can Shutdown 虚拟机权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Start
指示此 cmdlet 授予 Can Start 虚拟机权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Stop
指示此 cmdlet 授予“可以停止虚拟机”权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Store
指示此 cmdlet 授予 Can Store 虚拟机权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UpdateVMFunctionalLevel
指示此 cmdlet 授予更新虚拟机功能级别的权限。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UserRole
指定此 cmdlet 向其添加权限的用户角色。
Type: | SelfServiceUserRole |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-UserRolePermission
指定此 cmdlet 向其添加权限的 UserRolePermission 。 若要获取用户角色权限,请使用 Get-SCUserRolePermission cmdlet。
Type: | UserRolePermission |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMMServer
指定此 cmdlet 修改用户角色的 Virtual Machine Manager (VMM) 服务器。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
输出
UserRole
此 cmdlet 返回 UserRole 对象。