다음을 통해 공유


PSCredential.GetNetworkCredential Method

Definition

Returns an equivalent NetworkCredential object for this PSCredential.

A null is returned if -- current object has not been initialized -- current creds are not compatible with NetworkCredential (such as smart card creds or cert creds)

public:
 System::Net::NetworkCredential ^ GetNetworkCredential();
public System.Net.NetworkCredential GetNetworkCredential ();
member this.GetNetworkCredential : unit -> System.Net.NetworkCredential
Public Function GetNetworkCredential () As NetworkCredential

Returns

null if the current object has not been initialized. null if the current credentials are incompatible with a NetworkCredential -- such as smart card credentials. the appropriate network credential for this PSCredential otherwise.

Applies to