New-MgmtSvcPassword

Creates a random password.

Syntax

New-MgmtSvcPassword
   [-Length <Int32>]
   [<CommonParameters>]

Description

The New-MgmtSvcPassword cmdlet generates a cryptographically strong password for use with other settings. This cmdlet generates a value in memory. The Initialize-MgmtSvcFeature cmdlet calls this cmdlet to generate the passwords used across Windows Azure Pack for Windows Server components. For example, passwords used for database connection strings and access to resource providers.

Use this cmdlet to generate a cryptographically secure random password for use in setting basic authorization credentials. You can use the returned string as the value for the Value parameter for the Set-MgmtSvcSetting cmdlet, or as the password value in a connection string.

Examples

Example 1: Create a password

PS C:\> New-MgmtSvcPassword -Length 64

This command creates a random password that contains 64 characters.

Parameters

-Length

Specifies a password length. Choose a value between 8 and 128, in multiples of 4. The default length is 32 characters.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False