Get-DscLocalConfigurationManager
取得節點的本機組態管理員 (LCM) 設定和狀態。
語法
Get-DscLocalConfigurationManager
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
Description
Get-DscLocalConfigurationManager
Cmdlet 會取得 LCM 設定或中繼組態,以及節點的 LCM 狀態。 使用 Common Information Model (CIM) 會話來指定電腦。 如果您未指定目標計算機,Cmdlet 會從本機電腦取得組態設定。
範例
範例 1:取得本機計算機的 LCM 設定
Get-DscLocalConfigurationManager
ActionAfterReboot : ContinueConfiguration
AgentId : 47edd8c9-2798-4827-839a-b35cc87e69fb
AllowModuleOverWrite : False
CertificateID :
ConfigurationDownloadManagers : {}
ConfigurationID :
ConfigurationMode : ApplyAndMonitor
ConfigurationModeFrequencyMins : 15
Credential :
DebugMode : {NONE}
DownloadManagerCustomData :
DownloadManagerName :
LCMCompatibleVersions : {1.0, 2.0}
LCMState : Idle
LCMStateDetail :
LCMVersion : 2.0
StatusRetentionTimeInDays : 10
SignatureValidationPolicy : NONE
SignatureValidations : {}
MaximumDownloadSizeMB : 500
PartialConfigurations :
RebootNodeIfNeeded : False
RefreshFrequencyMins : 30
RefreshMode : PUSH
ReportManagers : {}
ResourceModuleManagers : {}
PSComputerName
此命令會取得本機電腦的 LCM 設定。
如需輸出個別屬性的詳細資訊,請參閱 設定本機設定管理員 檔。
範例 2:取得指定計算機的 LCM 設定
$Session = New-CimSession -ComputerName "Server01" -Credential ACCOUNTS\PattiFuller
Get-DscLocalConfigurationManager -CimSession $Session
ActionAfterReboot : ContinueConfiguration
AgentId : 169dfa57-a7f9-43be-a7a5-9dd06587e052
AllowModuleOverWrite : False
CertificateID :
ConfigurationDownloadManagers : {}
ConfigurationID :
ConfigurationMode : ApplyAndMonitor
ConfigurationModeFrequencyMins : 15
Credential :
DebugMode : {NONE}
DownloadManagerCustomData :
DownloadManagerName :
LCMCompatibleVersions : {1.0, 2.0}
LCMState : Idle
LCMStateDetail :
LCMVersion : 2.0
StatusRetentionTimeInDays : 10
SignatureValidationPolicy : NONE
SignatureValidations : {}
MaximumDownloadSizeMB : 500
PartialConfigurations :
RebootNodeIfNeeded : False
RefreshFrequencyMins : 30
RefreshMode : PUSH
ReportManagers : {}
ResourceModuleManagers : {}
PSComputerName : Server01
PSComputerName : Server01
此範例會取得 CIM 會話所指定電腦的 LCM 設定。 此範例會為名為 Server01 的電腦建立 CIM 會話,以搭配 Cmdlet 使用。 或者,建立 CIM 會話陣列,以將 Cmdlet 套用至多個指定的電腦。
第一個命令會使用 New-CimSession
Cmdlet 建立 CIM 會話,然後將 CimSession 物件儲存在 $Session 變數中。 命令會提示您輸入密碼。 如需詳細資訊,請輸入 Get-Help New-CimSession
。
第二個命令會取得 CimSession 儲存在$Session變數中之物件的本機 Configuration Manager 設定。 在此情況下,名為 Server01 的計算機。
參數
-AsJob
表示此 Cmdlet 會以背景工作的形式執行命令。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-CimSession
在遠端會話或遠端電腦上執行 Cmdlet。 輸入計算機名稱或會話物件,例如 New-CimSession
或 Get-CimSession
Cmdlet 的輸出。
類型: | CimSession[] |
別名: | Session |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ThrottleLimit
指定可以建立以執行 Cmdlet 的並行作業數目上限。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |