PSCredential.Explicit(PSCredential to NetworkCredential) Operator
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides an explicit cast to get a NetworkCredential from this PSCredential.
public:
static explicit operator System::Net::NetworkCredential ^(System::Management::Automation::PSCredential ^ credential);
public static explicit operator System.Net.NetworkCredential (System.Management.Automation.PSCredential credential);
static member op_Explicit : System.Management.Automation.PSCredential -> System.Net.NetworkCredential
Public Shared Narrowing Operator CType (credential As PSCredential) As NetworkCredential
Parameters
- credential
- PSCredential
PSCredential to convert.
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.