How do you enter the ADDS credentials using powershell.
Before I used
-Credential (Get-Credential)
I want to enter Username and Password using powershell:
-Credential $PSCredential
How do you enter username and password using the same script: $PSCredential?
This is what I have so far:
$Username = "Administrator" $SecurePassword = convertto-securestring "PaSsWorD$" -asplaintext -force $credentials = New-Object System.Management.Automation.PSCredential -ArgumentList $Username, $SecurePassword
Install-ADDSForest `
...
-Credential $credentials
...
- Edited by Philosophiae Sunday, March 29, 2015 6:49 PM