New-NetworkControllerCredential

New-NetworkControllerCredential

Adds or modifies a device credential in Network Controller.

構文

Parameter Set: Default
New-NetworkControllerCredential [-ResourceId] <String> [-Properties] <CredentialProperties> [[-ResourceMetadata] <ResourceMetadata> ] [[-VersionId] <System.String> ] [[-Force]] -ConnectionUri <String> [-CertificateThumbprint <System.String> ] [-Credential <PSCredential> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The New-NetworkControllerCredential cmdlet adds a new device credential to the Network Controller. If the credential is already present, this cmdlet will modify the properties of the credential. Network Controller uses the device credential to connect to a southbound device for managing the device. This cmdlet adds or modifies credentials based on username and password, Simple Network Management Protocol (SNMP)-based credentials and certificate-based credentials.

パラメーター

-CertificateThumbprint<System.String>

Specifies the digital public key X.509 certificate of a user account that has permission to perform this action. This is the certificate thumbprint of the certificate. This thumbprint must also be provided in the ClientCertificateThumbprint parameter in the Install-NetworkController or Set-NetworkController cmdlet so that Network Controller can authorize this user.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-ConnectionUri<String>

Specifies the Uniform Resource Identifier (URI) of the Network Controller, used by all Representational State Transfer (REST) clients to connect to the Network Controller.

Aliases

none

必須/オプション

true

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Credential<PSCredential>

Specifies a user credential that has permission to perform this action. The default is the current user. This user must be present in the security group provided in the ClientSecurityGroup parameter in the Install-NetworkController cmdlet or the Set-NetworkController cmdlet.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Force

ユーザーの確認を求めることなく、コマンドを強制的に実行します。

Aliases

none

必須/オプション

false

位置

9

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Properties<CredentialProperties>

This contains details about the Credential resource, such as the type of credential (can be username and password, SNMP community string or certificate), the user name of the resource (only applicable if the type is username and password) and the value of the credential.

Aliases

none

必須/オプション

true

位置

4

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

-ResourceId<String>

This is the ID of the credential that will be created or modified.

Aliases

none

必須/オプション

true

位置

1

既定値

none

パイプライン入力の受け入れ

true(ByPropertyName)

ワイルドカード文字の受け入れ

false

-ResourceMetadata<ResourceMetadata>

This parameter contains metadata information for the client, such as the tenant ID, group ID, and resource name.

Aliases

none

必須/オプション

false

位置

7

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-VersionId<System.String>

Specifies the entity tag (ETag) parameter of the resource. An ETag (entity tag) is an HTTP response header returned by an HTTP-compliant web server used to determine change in the content of a resource at a given URL. The value of the header is an opaque string representing the state of the resource at the time the response was generated.

Aliases

none

必須/オプション

false

位置

8

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Confirm

コマンドレットを実行する前に確認メッセージを表示します。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-WhatIf

コマンドレットが実行された場合に何が起きるのかを示します。コマンドレットは実行されません。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

<CommonParameters>

このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

  • This cmdlet outputs the following information:
    -- Resource reference uri
    -- Created time of the resource
    -- Instance ID of the resource
    -- Resource Metadata
    -- Resource ID
    -- Properties of the resource

使用例

Example 1: Create a network credential

This command creates a credential object and uses New-NetworkControllerCredential to add it to the network controller.

To get the Properties, put the output of New-NetworkControllerCredential in a variable (for example, x) and execute x.properties in the Powershell prompt.

PS C:\> $cred=New-Object Microsoft.Windows.Networkcontroller.credentialproperties
$cred.type="usernamepassword"
$cred.username="admin"
$cred.value="abcd"

New-NetworkControllerCredential -ConnectionUri "https://restserver" -Properties $Cred –ResourceId "Cred1"

関連項目

Get-NetworkControllerCredential

Install-NetworkController

Remove-NetworkControllerCredential

Set-NetworkController