PSCredential.GetNetworkCredential Method

Converts credential data into a NetworkCredential object.

Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation.dll)

Dim instance As PSCredential
Dim returnValue As NetworkCredential

returnValue = instance.GetNetworkCredential

public NetworkCredential GetNetworkCredential ()
public NetworkCredential GetNetworkCredential ()
public function GetNetworkCredential () : NetworkCredential

Return Value

A NetworkCredential object that contains the converted credential data.

To convert an existing PSCredential object to a NetworkCredential object, cast it as follows:

NetworkCredential networkCredential = (NetworkCredential) psCredential

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


Target Platforms

Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
© 2014 Microsoft