Kati Dougherty
asked on
How can I hide my password in the PowerShell script cmdlet used to migrate users to Exchange Online?
PowerShell Cmdlet to Migrate User to Exchange 2013 Online:
How can I hash my password (shown here as Pass123) in this cmdlet?
$cred = New-Object System.management.automati on.PSCrede ntial "kati.3dougherty@twdc.onmi crosoft.co m", (convertTo-SecureString "Pass123" -AsPlainText -Force)
$cred1 = New-Object System.management.automati on.PSCrede ntial "wdw\3dougk035", (convertTo-SecureString "Pass123" -AsPlainText -Force)
How can I hash my password (shown here as Pass123) in this cmdlet?
$cred = New-Object System.management.automati
$cred1 = New-Object System.management.automati
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I've never tried accessing the file as a different user or scheduled task to see if it could be converted back to a secure string in that scenario, so you'd just have to test. Create the file to save the encrypted password.
Then run the scheduled task on the same computer to use the file and see if it works.
Then run the scheduled task on the same computer to use the file and see if it works.
ASKER
Thanks FooTech!
ASKER
How do we encrypt the password in the DAILY script?
Thanks!
KatiD