顯示資源 URI 所指定之資源執行個體的管理資訊。

語法

Get-WSManInstance -SelectorSet <hashtable> [-ApplicationName <string>] [-ComputerName <string>] [-Credential <PSCredential>] [-Fragment <string>] [-Port <int>] [-UseSSL] [-ResourceURI] <Uri> [-Authentication <Authentication>] [-Dialect <Uri>] [-OptionSet <hashtable>] [-SessionOption <hashtable>] [<CommonParameters>]

Get-WSManInstance [-ApplicationName <string>] [-BasePropertiesOnly <switch>] [-ComputerName <string>] [-Credential <PSCredential>] [-Enumerate] [-filter <string>] [-Port <int>] [-References <switch>] [-ReturnType <string>] [-Shallow <switch>] [-UseSSL] [-ResourceURI] <Uri> [-Authentication <Authentication>] [-Dialect <Uri>] [-OptionSet <hashtable>] [-SessionOption <hashtable>] [<CommonParameters>]

Get-WSManInstance -ConnectionURI <Uri> -SelectorSet <hashtable> [-Fragment <string>] [-ResourceURI] <Uri> [-Authentication <Authentication>] [-Dialect <Uri>] [-OptionSet <hashtable>] [-SessionOption <hashtable>] [<CommonParameters>]

Get-WSManInstance -ConnectionURI <Uri> [-BasePropertiesOnly <switch>] [-Enumerate] [-filter <string>] [-References <switch>] [-ReturnType <string>] [-Shallow <switch>] [-ResourceURI] <Uri> [-Authentication <Authentication>] [-Dialect <Uri>] [-OptionSet <hashtable>] [-SessionOption <hashtable>] [<CommonParameters>]

描述

Get-WSManInstance Cmdlet 會擷取資源 URI 所指定之管理資源的執行個體。所擷取的資訊可能是複雜的 XML 資訊集 (物件) 或是簡單的值。此 Cmdlet 相當於標準的 WS-Management Get 命令。

此 Cmdlet 會使用 WS-Management 連線/傳輸層來擷取資訊。

參數

-ApplicationName <string>

指定連線中的應用程式名稱。ApplicationName 參數的預設值為 "WSMAN"。遠端端點的完整識別元的格式如下:

<傳輸>://<伺服器>:<連接埠>/<ApplicationName>

例如:

http://server01:8080/WSMAN

為工作階段提供服務的 Internet Information Services (IIS) 會將包含此端點的要求轉送到指定的應用程式。此 "WSMAN" 的預設設定適合大部分使用情況。此參數是為了多台電腦遠端連線到一台執行 Windows PowerShell 的電腦時使用而設計。在此情況下,IIS 會裝載 Web Services for Management (WS-Management) 以提升效率。

必要?

false

位置?

named

預設值

wsman

接受管線輸入?

false

接受萬用字元?

false

-Authentication <Authentication>

指定用於伺服器的驗證機制。可能的值為:

- Basic:Basic 是一種以純文字格式將使用者名稱和密碼傳送到伺服器或 Proxy 的配置。

- Default:使用 WS-Management 通訊協定所實作的驗證方法。這是預設值。

- Digest:Digest 是一種挑戰-回應配置,會使用伺服器指定的資料字串進行挑戰。

- Kerberos:用戶端電腦與伺服器可使用 Kerberos 憑證相互驗證。

- Negotiate:Negotiate 是一種挑戰-回應配置,可與伺服器或 Proxy 進行交涉以決定要用於驗證的配置。例如,此參數值允許交涉式驗證判斷是使用 Kerberos 通訊協定還是 NTLM。

- CredSSP:使用認證安全性服務提供者 (CredSSP) 驗證,該驗證允許使用者委派認證。此選項專為在一台遠端電腦執行,但卻從其他遠端電腦收集資料或執行其他命令的命令而設計。

警告:CredSSP 會從本機電腦將使用者的認證委派給遠端電腦。此做法會提高遠端操作的安全性風險。如果遠端電腦已經遭受危害,當認證傳送到遠端電腦時,便可能遭到利用來控制網路工作階段。

必要?

false

位置?

named

預設值

Default

接受管線輸入?

false

接受萬用字元?

false

-BasePropertiesOnly <switch>

只列舉屬於 ResourceURI 參數所指定之基底類別的屬性。此參數不能與 Shallow 參數同時指定。

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-ComputerName <string>

指定要對其執行管理作業的電腦。此值可以是完整網域名稱、NetBIOS 名稱或 IP 位址。請使用本機電腦名稱、localhost 或點 (.) 指定本機電腦。本機電腦為預設值。當遠端電腦所在的網域與使用者的網域不同時,必須使用完整網域名稱。您可以經由管道將此參數的值輸出至 Cmdlet。

必要?

false

位置?

named

預設值

localhost

接受管線輸入?

false

接受萬用字元?

false

-ConnectionURI <Uri>

指定連線端點。此字串的格式為:

<傳輸>://<伺服器>:<連接埠>/<ApplicationName>

下列字串是此參數的正確格式值:

http://Server01:8080/WSMAN

此 URI 必須是完整的 URI。

必要?

true

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-Credential <PSCredential>

指定具有執行此動作之權限的使用者帳戶。預設為目前使用者。請輸入使用者名稱,例如 "User01"、"Domain01\User01" 或 "User@Domain.com"。或者輸入 PSCredential 物件,例如 Get-Credential Cmdlet 所傳回的物件。當您輸入使用者名稱時,會提示您輸入密碼。

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-Dialect <Uri>

指定要在篩選器述詞中使用的方言。這可以是遠端服務所支援的任何方言。下列別名可用於方言 URI:

- WQL:https://schemas.microsoft.com/wbem/wsman/1/WQL

- Selector:https://schemas.microsoft.com/wbem/wsman/1/wsman/SelectorFilter

- Association:https://schemas.dmtf.org/wbem/wsman/1/cimbinding/associationFilter

必要?

false

位置?

named

預設值

https://schemas.microsoft.com/wbem/wsman/1/WQL

接受管線輸入?

false

接受萬用字元?

false

-Enumerate

傳回管理資源的所有執行個體。

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-filter <string>

指定列舉的篩選運算式。如果您使用此參數,也必須指定 Dialect 參數。

此參數的有效值需視 Dialect 參數中指定的方言而定。舉例來說,若 Dialect 參數設為 WQL,則 Filter 參數必須包含字串,且該字串必須包含有效的 WQL 查詢,例如下列查詢:

"Select * from Win32_Service where State != Running"

如果 Dialect 參數設為 Association,則 Filter 參數必須包含字串,且該字串必須包含有效的篩選器,例如下列篩選器:

-filter:Object=EPR[;AssociationClassName=AssocClassName][;ResultClassName=ClassName][;Role=RefPropertyName][;ResultRole=RefPropertyName]}

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-Fragment <string>

指定要為指定之作業更新或擷取之執行個體內的區段。例如,若要取得多工緩衝處理器服務的狀態,請指定 "-Fragment Status"。

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-OptionSet <hashtable>

將一組切換參數傳遞到服務,以修改或精簡要求的性質。這些切換參數與命令列殼層中使用的切換參數相似,因為它們都是服務專有的參數。您可以指定任何數量的選項。

下列範例會示範將值 1、2、3 傳遞給參數 a、b、c 的語法:

-OptionSet @{a=1;b=2;c=3}

必要?

false

位置?

named

預設值

接受管線輸入?

true (ByValue, ByPropertyName)

接受萬用字元?

false

-Port <int>

指定用戶端與 WinRM 服務連線時所要使用的連接埠。傳輸協定為 HTTP 時的預設連接埠是 80。傳輸協定為 HTTPS 時的預設連接埠是 443。當您使用 HTTPS 做為傳輸協定時,ComputerName 參數的值必須與伺服器的憑證一般名稱 (CN) 相符。然而,若將 SkipCNCheck 參數指定為 SessionOption 參數的一部分,則伺服器的憑證一般名稱不必與伺服器的主機名稱相符。SkipCNCheck 參數只能用於受信任的電腦。

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-References <switch>

表示應該擷取關聯 (Association) 執行個體,而不是關聯的 (Associated) 執行個體。只有當 Dialect 參數設為 "Association" 的值時,您才能使用這個參數。

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-ResourceURI <Uri>

包含資源類別或執行個體的統一資源識別項 (URI)。URI 是用來識別電腦上特定類型的資源,如磁碟或處理序。

URI 由首碼和資源路徑組成。例如:

https://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_LogicalDisk

https://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_NumericSensor

必要?

true

位置?

1

預設值

接受管線輸入?

true (ByValue, ByPropertyName)

接受萬用字元?

false

-ReturnType <string>

指定要傳回的資料型別。有效的值包括:

Object (預設)

EPR

ObjectAndEPR

如果指定 Object 或未使用此參數,只會傳回物件。如果指定 EPR (端點參考),則只會傳回物件的端點參考。參考端點包含有關執行個體之資源 URI 和選取器的資訊。如果指定 ObjectAndEPR,則會傳回物件以及其關聯的端點參考。

必要?

false

位置?

named

預設值

Object

接受管線輸入?

false

接受萬用字元?

false

-SelectorSet <hashtable>

指定一組用來選取特定管理資源執行個體的值組。有一個以上的資源執行個體時,就必須使用 SelectorSet 參數。SelectorSet 參數的值必須是雜湊表。

下列範例示範如何輸入此參數的值:

-SelectorSet @{Name="WinRM";ID="yyy"}

必要?

true

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-SessionOption <hashtable>

定義一組用於 WS-Management 工作階段的擴充選項。請輸入使用 New-WSManSessionOption Cmdlet 所建立的 SessionOption 物件。如需可用選項的詳細資訊,請參閱 New-WSManSessionOption。

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-Shallow <switch>

只能傳回資源 URI 中指定之基底類別的執行個體。如果未指定此切換參數,則會傳回 URI 及其所有衍生類別中指定之基底類別的執行個體。

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-UseSSL

指定必須使用安全通訊端層 (SSL) 通訊協定來建立與遠端電腦的連線。預設不會使用 SSL。

WS-Management 會將所有透過網路傳輸的 Windows PowerShell 內容加密。UseSSL 參數可以讓您指定使用 HTTPS 提供多一層防護,而非使用 HTTP。如果連線所用的連接埠無法供 SSL 使用,但卻指定此參數,則命令會失敗。

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

<CommonParameters>

這個 Cmdlet 支援一般參數:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。如需詳細資訊,請參閱 about_Commonparameters.

輸入和輸出

輸入型別是可經由管道輸出至 Cmdlet 的物件型別。傳回型別則是 Cmdlet 所傳回的物件型別。

輸入

這個命令不接受任何輸入。

輸出

System.Xml.XmlElement

Get-WSManInstance Cmdlet 會產生 XMLElement 物件。

範例 1

C:\PS>get-wsmaninstance wmicimv2/win32_service -selectorset @{name="winrm"} -computername server01

xsi                     : http://www.w3.org/2001/XMLSchema-instance
p                       : https://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Service
cim                     : https://schemas.dmtf.org/wbem/wscim/1/common
type                    : p:Win32_Service_Type
lang                    : en-US
AcceptPause             : false
AcceptStop              : true
Caption                 : Windows Remote Management (WS-Management)
CheckPoint              : 0
CreationClassName       : Win32_Service
Description             : Windows Remote Management (WinRM) service implements the WS-Management protocol for remote 
                          management. WS-Management is a standard web services protocol used for remote software and 
                          hardware management. The WinRM service listens on the network for WS-Management requests 
                          and processes them. The WinRM Service needs to be configured with a listener using the 
                          winrm.cmd command line tool or through Group Policy in order for it to listen over the 
                          network. The WinRM service provides access to WMI data and enables event collection. Event 
                          collection and subscription to events require that the service is running. WinRM messages 
                          use HTTP and HTTPS as transports. The WinRM service does not depend on IIS but is 
                          preconfigured to share a port with IIS on the same machine.  The WinRM service reserves the
                          /wsman URL prefix. To prevent conflicts with IIS, administrators should ensure that any 
                          websites hosted on IIS do not use the /wsman URL prefix.
DesktopInteract         : false
DisplayName             : Windows Remote Management (WS-Management)
ErrorControl            : Normal
ExitCode                : 0
InstallDate             : InstallDate
Name                    : winrm
PathName                : C:\Windows\System32\svchost.exe -k NetworkService
ProcessId               : 948
ServiceSpecificExitCode : 0
ServiceType             : Share Process
Started                 : true
StartMode               : Auto
StartName               : NT AUTHORITY\NetworkService
State                   : Running
Status                  : OK
SystemCreationClassName : Win32_ComputerSystem
SystemName              : SERVER01
TagId                   : 0
WaitHint                : 0

Description
-----------
這個命令會傳回 Windows Management Instrumentation (WMI) 所公開有關遠端 server01 電腦上 WinRM 服務的所有資訊。






範例 2

C:\PS>get-wsmaninstance wmicimv2/win32_service -selectorset @{name="spooler"} -fragment status -computername server01

XmlFragment=OK

Description
-----------
這個命令只會傳回遠端 server01 電腦上多工緩衝處理器服務的狀態。






範例 3

C:\PS>get-wsmaninstance -enumerate wmicimv2/win32_process 

OSName                     : Microsoft Windows Vista Ultimate |C:\Windows|\Device\Harddisk0\Partition3
OtherOperationCount        : 11441
OtherTransferCount         : 428570
PageFaults                 : 27346
PageFileUsage              : 16428
ParentProcessId            : 604
PeakPageFileUsage          : 17588
PeakVirtualSize            : 93876224
PeakWorkingSetSize         : 12472
Priority                   : 8
PrivatePageCount           : 16822272
ProcessId                  : 1160
QuotaNonPagedPoolUsage     : 14
QuotaPagedPoolUsage        : 126
QuotaPeakNonPagedPoolUsage : 16
QuotaPeakPagedPoolUsage    : 159
ReadOperationCount         : 29568
ReadTransferCount          : 1660581404
SessionId                  : 0
Status                     : Status
TerminationDate            : TerminationDate
ThreadCount                : 23
UserModeTime               : 763156892
VirtualSize                : 80846848
WindowsVersion             : 6.0.6001
WorkingSetSize             : 11624448
WriteOperationCount        : 1913
WriteTransferCount         : 6825768

xsi                        : http://www.w3.org/2001/XMLSchema-instance
p                          : https://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Process
cim                        : https://schemas.dmtf.org/wbem/wscim/1/common
type                       : p:Win32_Process_Type
lang                       : en-US
Caption                    : svchost.exe
CommandLine                : C:\Windows\System32\svchost.exe -k LocalSystemNetworkRestricted
CreationClassName          : Win32_Process
CreationDate               : CreationDate
CSCreationClassName        : Win32_ComputerSystem
CSName                     : COMPUTER01
Description                : svchost.exe
ExecutablePath             : C:\Windows\System32\svchost.exe
ExecutionState             : ExecutionState
Handle                     : 1192
HandleCount                : 832

...

Description
-----------
這個命令會傳回本機電腦上 WMI Win32_Process 類別的所有執行個體。






範例 4

C:\PS>get-wsmaninstance -enumerate wmicimv2/win32_service -returntype epr

xsi                     : http://www.w3.org/2001/XMLSchema-instance
p                       : https://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Service
cim                     : https://schemas.dmtf.org/wbem/wscim/1/common
type                    : p:Win32_Service_Type
lang                    : en-US
AcceptPause             : false
AcceptStop              : false
Caption                 : Visual Studio 2008 Remote Debugger
CheckPoint              : 0
CreationClassName       : Win32_Service
Description             : Allows members of the Administrators group to remotely debug server applications using Visual
                           Studio 2008. Use the Visual Studio 2008 Remote Debugging Configuration Wizard to enable this
                           service.
DesktopInteract         : false
DisplayName             : Visual Studio 2008 Remote Debugger
ErrorControl            : Ignore
ExitCode                : 1077
InstallDate             : InstallDate
Name                    : msvsmon90
PathName                : "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86\msvsmon.exe" /s
                          ervice msvsmon90
ProcessId               : 0
ServiceSpecificExitCode : 0
ServiceType             : Own Process
Started                 : false
StartMode               : Disabled
StartName               : LocalSystem
State                   : Stopped
Status                  : OK
SystemCreationClassName : Win32_ComputerSystem
SystemName              : COMPUTER01
TagId                   : 0
WaitHint                : 0

...

Description
-----------
這個命令會傳回與本機電腦上所有服務對應的端點參考。






範例 5

C:\PS>Get-WSManInstance -Enumerate wmicimv2/* -filter "select * from win32_service where StartMode = 'Auto' and State = 'Stopped'" -computername server01

xsi                     : http://www.w3.org/2001/XMLSchema-instance
p                       : https://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Service
cim                     : https://schemas.dmtf.org/wbem/wscim/1/common
type                    : p:Win32_Service_Type
lang                    : en-US
AcceptPause             : false
AcceptStop              : false
Caption                 : Windows Media Center Service Launcher
CheckPoint              : 0
CreationClassName       : Win32_Service
Description             : Starts Windows Media Center Scheduler and Windows Media Center Receiver services 
                          at startup if TV is enabled within Windows Media Center.
DesktopInteract         : false
DisplayName             : Windows Media Center Service Launcher
ErrorControl            : Ignore
ExitCode                : 0
InstallDate             : InstallDate
Name                    : ehstart
PathName                : C:\Windows\system32\svchost.exe -k LocalServiceNoNetwork
ProcessId               : 0
ServiceSpecificExitCode : 0
ServiceType             : Share Process
Started                 : false
StartMode               : Auto
StartName               : NT AUTHORITY\LocalService
State                   : Stopped
Status                  : OK
SystemCreationClassName : Win32_ComputerSystem
SystemName              : Server01
TagId                   : 0
WaitHint                : 0

...

Description
-----------
這個命令會列出 Server01 遠端電腦上符合下列準則的所有服務:

   - 服務的啟動類型是「自動」。
   - 服務已停止。






範例 6

C:\PS>get-wsmaninstance winrm/config/listener -selectorset @{Address="*";Transport="http"}

cfg                   : https://schemas.microsoft.com/wbem/wsman/1/config/listener
xsi                   : http://www.w3.org/2001/XMLSchema-instance
lang                  : en-US
Address               : *
Transport             : HTTP
Port                  : 80
Hostname              :
Enabled               : true
URLPrefix             : wsman
CertificateThumbprint :
ListeningOn           : {100.0.0.1, 123.123.123.123, ::1, 2001:4898:0:fff:0:5efe:123.123.123.123...}

Description
-----------
這個命令會針對符合選取器集內之準則的接聽程式,列出本機電腦上的 WS-Management 接聽程式設定。






範例 7

C:\PS>get-wsmaninstance winrm/config/listener -selectorset @{Address="*";Transport="http"} -computername server01

cfg                   : https://schemas.microsoft.com/wbem/wsman/1/config/listener
xsi                   : http://www.w3.org/2001/XMLSchema-instance
lang                  : en-US
Address               : *
Transport             : HTTP
Port                  : 80
Hostname              :
Enabled               : true
URLPrefix             : wsman
CertificateThumbprint :
ListeningOn           : {100.0.0.1, 123.123.123.124, ::1, 2001:4898:0:fff:0:5efe:123.123.123.124...}

Description
-----------
這個命令會針對符合選取器集內之準則的接聽程式,列出遠端 server01 電腦上的 WS-Management 接聽程式設定。






範例 8

C:\PS>Get-WSManInstance -Enumerate -Dialect association -filter "{Object=win32_service?name=winrm}" -res wmicimv2/*

xsi                       : http://www.w3.org/2001/XMLSchema-instance
p                         : https://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_ComputerSystem
cim                       : https://schemas.dmtf.org/wbem/wscim/1/common
type                      : p:Win32_ComputerSystem_Type
lang                      : en-US
AdminPasswordStatus       : 1
AutomaticManagedPagefile  : true
AutomaticResetBootOption  : true
AutomaticResetCapability  : true
BootOptionOnLimit         : BootOptionOnLimit
BootOptionOnWatchDog      : BootOptionOnWatchDog
BootROMSupported          : true
BootupState               : Normal boot
Caption                   : SERVER01
ChassisBootupState        : 3
CreationClassName         : Win32_ComputerSystem
CurrentTimeZone           : -480
DaylightInEffect          : false
Description               : AT/AT COMPATIBLE
DNSHostName               : server01
Domain                    : site01.corp.fabrikam.com
DomainRole                : 1
EnableDaylightSavingsTime : true
FrontPanelResetStatus     : 2
InfraredSupported         : false
InstallDate               : InstallDate
KeyboardPasswordStatus    : 2
LastLoadInfo              : LastLoadInfo
Manufacturer              : Dell Inc.
Model                     : OptiPlex 745
Name                      : SERVER01
NameFormat                : NameFormat
NetworkServerModeEnabled  : true
NumberOfLogicalProcessors : 2
NumberOfProcessors        : 1
OEMStringArray            : www.dell.com
PartOfDomain              : true
PauseAfterReset           : -1
PCSystemType              : 5
PowerManagementSupported  : PowerManagementSupported
PowerOnPasswordStatus     : 1
PowerState                : 0
PowerSupplyState          : 3
PrimaryOwnerContact       : PrimaryOwnerContact
PrimaryOwnerName          : testuser01
ResetCapability           : 1
ResetCount                : -1
ResetLimit                : -1
Roles                     : {LM_Workstation, LM_Server, SQLServer, NT}
Status                    : OK
SystemStartupDelay        : SystemStartupDelay
SystemStartupSetting      : SystemStartupSetting
SystemType                : X86-based PC
ThermalState              : 3
TotalPhysicalMemory       : 3217760256
UserName                  : FABRIKAM\testuser01
WakeUpType                : 6
Workgroup                 : Workgroup

xsi                     : http://www.w3.org/2001/XMLSchema-instance
p                       : https://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Service
cim                     : https://schemas.dmtf.org/wbem/wscim/1/common
type                    : p:Win32_Service_Type
lang                    : en-US
AcceptPause             : false
AcceptStop              : false
Caption                 : Remote Procedure Call (RPC)
CheckPoint              : 0
CreationClassName       : Win32_Service
Description             : Serves as the endpoint mapper and COM Service Control Manager. If this service is stopped 
                          or disabled, programs using COM or Remote Procedure Call (RPC) services will not function 
                          properly.
DesktopInteract         : false
DisplayName             : Remote Procedure Call (RPC)
ErrorControl            : Normal
ExitCode                : 0
InstallDate             : InstallDate
Name                    : RpcSs
PathName                : C:\Windows\system32\svchost.exe -k rpcss
ProcessId               : 1100
ServiceSpecificExitCode : 0
ServiceType             : Share Process
Started                 : true
StartMode               : Auto
StartName               : NT AUTHORITY\NetworkService
State                   : Running
Status                  : OK
SystemCreationClassName : Win32_ComputerSystem
SystemName              : SERVER01
TagId                   : 0
WaitHint                : 0

xsi                     : http://www.w3.org/2001/XMLSchema-instance
p                       : https://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_SystemDriver
cim                     : https://schemas.dmtf.org/wbem/wscim/1/common
type                    : p:Win32_SystemDriver_Type
lang                    : en-US
AcceptPause             : false
AcceptStop              : true
Caption                 : HTTP
CreationClassName       : Win32_SystemDriver
Description             : HTTP
DesktopInteract         : false
DisplayName             : HTTP
ErrorControl            : Normal
ExitCode                : 0
InstallDate             : InstallDate
Name                    : HTTP
PathName                : C:\Windows\system32\drivers\HTTP.sys
ServiceSpecificExitCode : 0
ServiceType             : Kernel Driver
Started                 : true
StartMode               : Manual
StartName               :
State                   : Running
Status                  : OK
SystemCreationClassName : Win32_ComputerSystem
SystemName              : SERVER01
TagId                   : 0

Description
-----------
這個命令會取得與指定之執行個體 (winrm) 相關之關聯的 (Associated) 執行個體。

重要:您必須以引號括住篩選器,如範例所示。






範例 9

C:\PS>Get-WSManInstance -Enumerate -Dialect association -References -filter "{Object=win32_service?name=winrm}" -res wmicimv2/*

Description
-----------
這個命令會取得與指定之執行個體 (winrm) 相關的關聯 (Association) 執行個體。因為 Dialect 參數設定為 "association",而且使用了 Reference 參數,所以這個命令會傳回關聯 (Association) 執行個體,而不是關聯的 (Associated) 執行個體。

重要:您必須以引號括住篩選器,如範例所示。






請參閱




目錄