共用方式為


Get-SCPendingServiceSetting

取得處於暫止服務狀態之服務的暫止服務設定。

語法

Get-SCPendingServiceSetting
   [-VMMServer <ServerConnection>]
   [-Service] <Service>
   [-Name <String>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]

Description

Get-SCPendingServiceSetting Cmdlet 會取得處於擱置服務狀態之服務的擱置服務設定。

範例

範例 1:從處於擱置服務狀態的服務擷取所有暫止服務設定

PS C:\> $Service = Get-SCService -Name "Service01"
PS C:\> Get-SCPendingServiceSetting -Service $Service

第一個命令會取得名為 Service01 的服務物件,並將物件儲存在$Service變數中。

第二個命令會取得 Service01 的暫止服務設定,並向使用者顯示它們。

參數

-Name

指定 Virtual Machine Manager (VMM) 物件的名稱。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-OnBehalfOfUser

指定用戶名稱。 這個 Cmdlet 代表此參數指定的用戶運作。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-OnBehalfOfUserRole

指定使用者角色。 若要取得使用者角色,請使用 Get-SCUserRole Cmdlet。 這個 Cmdlet 代表此參數指定的使用者角色運作。

類型:UserRole
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Service

指定 VMM 服務物件。

類型:Service
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-VMMServer

指定 VMM 伺服器物件。

類型:ServerConnection
Position:Named
預設值:None
必要:False
接受管線輸入:True
接受萬用字元:False