StringExtensions.ToSecureString Method

This element is introduced in Windows PowerShell 5.0.

Namespace: Microsoft.OneGet.Utility.Extensions
Assembly: Microsoft.OneGet.Utility (in Microsoft.OneGet.Utility.dll)

Usage

'Usage
Dim password As String
Dim returnValue As SecureString

returnValue = StringExtensions.ToSecureString(password)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function ToSecureString ( _
    password As String _
) As SecureString
[ExtensionAttribute] 
public static SecureString ToSecureString (
    string password
)
[ExtensionAttribute] 
public:
static SecureString^ ToSecureString (
    String^ password
)
/** @attribute ExtensionAttribute() */ 
public static SecureString ToSecureString (
    String password
)
ExtensionAttribute 
public static function ToSecureString (
    password : String
) : SecureString

Parameters

  • password

Return Value

Returns SecureString.

Thread Safety

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

Platforms

Target Platforms

See Also

Reference

StringExtensions Class
StringExtensions Members
Microsoft.OneGet.Utility.Extensions Namespace