How to create security string in exchange cmdlet

 When create a new mailbox or any other command which needs input password, you may create this variable which can be used as the value of the parameter "-Password".

 

[PS] D:/Windows/System32>$pwd = Read-Host "asd" -AsSecureString
asd: *******

 

[PS] D:/Windows/System32>New-Mailbox -Name user1 -Database "First Storage Group/Mailbox Database" -UserPrincipalName [email protected] -Password $pwd

 

Name                      Alias                ServerName       ProhibitSendQuota
----                           -----                ----------                  ---------------
user1                     user1                exch-i-856               unlimited

你可能感兴趣的:(How to create security string in exchange cmdlet)