New-CimSessionOption

New-CimSessionOption

Specifies advanced options for the New-CimSession cmdlet.

구문

Parameter Set: ProtocolTypeSet
New-CimSessionOption [-Protocol] <ProtocolType> {Dcom | Default | Wsman} [-Culture <CultureInfo> ] [-UICulture <CultureInfo> ] [ <CommonParameters>]

Parameter Set: DcomParameterSet
New-CimSessionOption [-Culture <CultureInfo> ] [-Impersonation <ImpersonationType> ] [-PacketIntegrity] [-PacketPrivacy] [-UICulture <CultureInfo> ] [ <CommonParameters>]

Parameter Set: WSManParameterSet
New-CimSessionOption [-Culture <CultureInfo> ] [-EncodePortInServicePrincipalName] [-Encoding <PacketEncoding> ] [-HttpPrefix <Uri> ] [-MaxEnvelopeSizeKB <UInt32> ] [-NoEncryption] [-ProxyAuthentication <PasswordAuthenticationMechanism> ] [-ProxyCertificateThumbprint <String> ] [-ProxyCredential <PSCredential> ] [-ProxyType <ProxyType> ] [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-UICulture <CultureInfo> ] [-UseSsl] [ <CommonParameters>]

자세한 설명

The New-CimSessionOption cmdlet creates an instance of a CIM session options object. You use a CIM session options object as input to the New-CimSession cmdlet to specify the options for a CIM session.

This cmdlet has two parameter sets, one for WsMan options and one for Distributed Component Object Model (DCOM) options. Depending on which parameters you use, the cmdlet returns either an instance of DCOM session options or returns WsMan session options.

매개 변수

-Culture<CultureInfo>

Specifies the user interface culture to use for the CIM session. Specify the value for this parameter using one of the following formats:

Enter a culture name in <languagecode2>-<country/regioncode2> format such as "EN-US".

A variable that contains a CultureInfo object.

A command that gets a CultureInfo object, such as Get-Culture. For more information about Get-Culture, see https://technet.microsoft.com/library/hh849930.aspx.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-EncodePortInServicePrincipalName

Indicates that the Kerberos connection is connecting to a service whose service principal name (SPN) includes the service port number. This type of connection is not common.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-Encoding<PacketEncoding>

Specifies the encoding used for the WsMan protocol.

이 매개 변수에 허용되는 값은 다음과 같습니다. Default, Utf8, or Utf16.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-HttpPrefix<Uri>

Specifies the part of the HTTP URL after the computer name and port number. Changing this is not common.

By default, the value of this parameter is /wsman.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-Impersonation<ImpersonationType>

Creates a DCOM session to Windows Management Instrumentation (WMI) using impersonation.

Valid values for this parameter are:

-- Default: DCOM can choose the impersonation level using its normal security negotiation algorithm.
-- None: The client is anonymous to the server. The server process can impersonate the client, but the impersonation token does not contain any information and cannot be used.
-- Identify: Allows objects to query the credentials of the caller.
-- Impersonate: Allows objects to use the credentials of the caller.
-- Delegate: Allows objects to permit other objects to use the credentials of the caller.

If Impersonation is not specified, the New-CimSession cmdlet uses the value of 3: Impersonate

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-MaxEnvelopeSizeKB<UInt32>

Specifies the size limit of WsMan XML messages for either direction.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-NoEncryption

Specifies that data encryption is turned off.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-PacketIntegrity

Specifies that the DCOM session created to WMI uses the Component Object Model (COM) PacketIntegrity functionality. For enhanced security, by default all CIM sessions created using DCOM have the PacketIntegrity parameter set to True.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-PacketPrivacy

Creates a DCOM session to WMI using the COM PacketPrivacy. For enhanced security, by default all CIM sessions created using DCOM have the PacketPrivacy parameter set to true.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Protocol<ProtocolType>

Specifies the protocol to use.

이 매개 변수에 허용되는 값은 다음과 같습니다. DCOM or WinRM.

별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-ProxyAuthentication<PasswordAuthenticationMechanism>

Specifies the authentication method to use for proxy resolution.

이 매개 변수에 허용되는 값은 다음과 같습니다. Default, Digest, Negotiate, Basic, Kerberos, NtlmDomain, or CredSsp.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-ProxyCertificateThumbprint<String>

Specifies the (x.509) digital public key certificate of a user account for proxy authentication. Enter the certificate thumbprint of the certificate.

Certificates are used in client certificate-based authentication. They can only be mapped to local user accounts and they do not work with domain accounts.

To get a certificate thumbprint, use the Get-Item or Get-ChildItem cmdlets in the Windows PowerShell Cert: drive. For more information about the Get-ChildItem cmdlet for the Windows PowerShell Cert: drive, see https://technet.microsoft.com/library/hh847761.aspx. For more information about Get-Item, see https://technet.microsoft.com/library/hh849788.aspx

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-ProxyCredential<PSCredential>

Specifies the credentials to use for proxy authentication. Enter one of the following:

-- A variable that contains a PSCredential object.
-- A command that gets a PSCredential object, such as Get-Credential

If this option is not set, then you cannot specify any credentials.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-ProxyType<ProxyType>

Specifies the host name resolution mechanism to use.

이 매개 변수에 허용되는 값은 다음과 같습니다. None, WinHttp, Auto, or InternetExplorer.

By default, the value of this parameter is InternetExplorer.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-SkipCACheck

Indicates that when connecting over HTTPS, the client does not validate that the server certificate is signed by a trusted certification authority (CA).

Use this parameter only when the remote computer is trusted using another mechanism, such as when the remote computer is part of a network that is physically secure and isolated, or when the remote computer is listed as a trusted host in a WinRM configuration.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-SkipCNCheck

Indicates that the certificate common name (CN) of the server does not need to match the hostname of the server.

Use this parameter only for remote operations that use the HTTPS protocol.

Note: use this parameter only for trusted computers.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-SkipRevocationCheck

Indicates that the revocation check for server certificates is skipped.

Note: use this parameter only for trusted computers.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-UICulture<CultureInfo>

Specifies the user interface culture to use for the CIM session. Specify the value for this parameter using one of the following formats:

Enter a culture name in <languagecode2>-<country/regioncode2> format such as "EN-US".

A variable that contains a CultureInfo object.

A command that gets a CultureInfo object, such as Get-Culture. For more information about Get-Culture, see https://technet.microsoft.com/library/hh849930.aspx.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-UseSsl

Indicates that SSL should be used to establish a connection to the remote computer. By default, SSL is not used.

WsMan encrypts all content that is transmitted over the network. This parameter lets you specify the additional protection of HTTPS instead of HTTP. If SSL is not available on the port used for the connection and you specify this parameter, then the command fails.

It is recommended that you use this parameter only when the PacketPrivacy parameter is not specified.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

  • None

    This cmdlet accepts no input objects.

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • CIMSessionOption

    This cmdlet returns an object that contains CIM session options information.

예제

Example 1: Create a CIM session options object for DCOM

This set of commands creates a CIM session options object for the DCOM protocol and stores it in a variable named $so. The contents of the variable are then passed to the New-CimSession cmdlet. New-CimSession then creates a new CIM session with the remote server named Server01, using the options defined in the variable.

PS C:\> $so = New-CimSessionOption -Protocol DCOM
PS C:\> New-CimSession -ComputerName Server01 -SessionOption $so

Example 2: Create a CIM session options object for WsMan

This command creates a CIM session options object for the WsMan protocol. The object contains configuration for the authentication mode of Kerberos specified by the ProxyAuthentication parameter, the credentials specified by the ProxyCredential parameter, and specifies that the command is to skip the CA check, skip the CN check, and use SSL.

PS C:\> New-CimSessionOption -ProxyAuthentication Kerberos -ProxyCredential $cred -SkipCACheck -SkipCNCheck -UseSsl

Example 3: Create a CIM session options object with the culture specified

This command specifies the culture that is used for the CIM session. By default, the culture of the client is used when performing operations. However, the default culture can be overridden using the Culture parameter.

PS C:\> New-CimSessionOption -Culture Fr-Fr –Protocol Wsman

관련 항목

New-CimSession

Get-ChildItem

Get-Credential

Get-Culture

Get-Item