GetSchema

System Center

Updated: August 10, 2011

Applies To: Operations Manager 2007 R2

GetSchema is a complex data type that is used to specify the set of properties required to perform a WS-Management Get operations.


<xsd:complexType name="GetSchema">
  <xsd:sequence>
    <xsd:element name="Protocol" type="ProtocolType" />
    <xsd:element name="TargetSystem" type="xsd:string" />
    <xsd:element name="Port" type="PortType" />
    <xsd:element name="Authentication" type="AuthenticationType" />
    <xsd:element name="UserName" type="xsd:string" />
    <xsd:element name="Password" type="xsd:string" />
    <xsd:element name="SkipCACheck" type="xsd:boolean" />
    <xsd:element name="SkipCNCheck" type="xsd:boolean" />
    <xsd:element name="OutputErrorIfAny" type="xsd:boolean" minOccurs="0" maxOccurs="1" />
    <xsd:element name="UTF" type="UtfType" />
    <xsd:element name="Uri" type="xsd:string" />
    <xsd:element name="Selector" type="xsd:string" />
    <xsd:element name="TimeOutInMS" type="xsd:unsignedLong" />
    <xsd:element name="EventPolicy" type="EventPolicySchema" minOccurs="0" maxOccurs="1" />
  </xsd:sequence>
</xsd:complexType>

The GetSchema data type has the following sub-elements:

 

Parameter Type Description

Protocol

String

Contains a string specifying the ProtocolType that is used to communicate between computers. The supported values are HTTP and HTTPS.

TargetSystem

String

Specifies the system against which the request is submitted. This can be a fully qualified domain name or an IP address. For more information, see notes later in this document.

Port

Integer

Specifies the port number for the request. Must be a value in the range of 0 to 65535.

Authentication

String

Contains the AuthenticationType to use for communicating. Currently supported values are:

  • None

  • Basic

  • Kerberos

  • Digest

  • Negotiate

UserName

String

Contains the user name used for authentication. For use with Basic, Digest, and Negotiate authentication only. For more information, see notes later in this document.

Password

String

Contains the password that is used for authentication. For use with Basic, Digest, and Negotiate authentication only. For more information, see notes later in this document.

SkipCACheck

Boolean

Specifies whether to skip any validations against the certification authority (CA) on the target system. Enabling this flag causes the modules to trust the certificate on a target system, even if they are self-signed.

SkipCNCheck

Boolean

Specifies that machine name and server certificate common name (CN) check should be skipped. For more information, see notes later in this document.

OutputErrorIfAny

Boolean

Optional. Specifies whether to output any errors. Default value is false.

UTF

String

Specifies the encoding format. Currently supported values are UTF-8 and UTF-16.

Uri

String

Contains the complete URI for the objects being queried for.

Selector

String

Contains the selector string used to filter and select objects being queried for.

TimeOutInMS

unsigned Integer

Specifies the amount of time to wait for the response from the computer queried. Default value is 60,000 milliseconds (60 seconds). For more information, see notes later in this document.

EventPolicy

Integer

Not used.

TargetSystem

This parameter is often passed by a substitution parameter based on the target or other configuration. For example:

$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$

UserName and Password

For Kerberos and Negotiate authentication, the UserName parameter can still be passed, but it does not affect the outcome of the calling method.

You can also pass in the UserName of a RunAsAccount associated with a RunAsProfile under which WsMan executes the module. For example:


$RunAs[Name="WSMan!Microsoft.SystemCenter.WSManagement.WSManActionAccount"]/UserName$

The Password parameter can be passed in the same way. For example:

$RunAs[Name="WSMan!Microsoft.SystemCenter.WSManagement.WSManActionAccount"]/Password$

This assumes the reference to the Microsoft.SystemCenter.WSManagement.Library has been set to WSMan. For example:


<Reference Alias="WSMan">
   <ID>Microsoft.SystemCenter.WSManagement.Library</ID>
   <Version>6.0.6278.0</Version>
   <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>

SkipCNCheck

When using HTTPS, the computer name must match the server's certificate common name (CN) unless the SkipCNCheck parameter is set to true. This parameter should be set to true when communicating with a device using HTTPS and using an IP address (rather than a fully qualified domain name), or when the name under which the certificate has been issued is different from the name of the target system.

TimeOutInMS

When this parameter is overridden, WS-Management uses the overridden value or four times NetworkDelayms, whichever is greater. The value in NetworkDelayms can be found by running the following at the command prompt:

winrm get winrm/Config/Client

For more information about URIs, see Resource URIs.

The following example shows data that is of the type GetSchema.


  <Get>
      <Protocol>http</Protocol>
      <TargetSystem>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</TargetSystem>
      <Port>80</Port>
      <Authentication>kerberos</Authentication>
      <UserName />
      <Password />
      <SkipCACheck>true</SkipCACheck>
      <SkipCNCheck>true</SkipCNCheck>
      <UTF>utf-8</UTF>
      <Uri>http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Service</Uri>
      <Selector>Name=spooler</Selector>
      <TimeOutInMS>2000</TimeOutInMS>
  </Get>

 

   

Schema Type

Microsoft.SystemCenter.WSManagement.WSManData

Library

Microsoft.SystemCenter.WSManagement. Library

 
Show: