Creates a random password.


   [-Length <Int32>]


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.


Example 1: Create a password

PS C:\> New-MgmtSvcPassword -Length 64

This command creates a random password that contains 64 characters.

Optional Parameters


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

Default value:None
Accept pipeline input:False
Accept wildcard characters:False