Click to Rate and Give Feedback
MSDN
MSDN Library
Windows PowerShell
PSCredential Class
 PSCredential.GetNetworkCredential M...
Collapse All/Expand All Collapse All
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
Visual Basic
Public Function GetNetworkCredential As NetworkCredential
C#
public NetworkCredential GetNetworkCredential ()
C++
public:
NetworkCredential^ GetNetworkCredential ()
J#
public NetworkCredential GetNetworkCredential ()
JScript
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.

Development Platforms

Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP, Windows 7, Windows 2008 R2

Target Platforms

Windows Server 2008, Windows Server 2003, Windows Vista, Windows XP, Windows 7, Windows 2008 R2
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker