Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Created September 8, 2016 07:37
Show Gist options
  • Save nivleshc/fd3227da862813a936532c1590392039 to your computer and use it in GitHub Desktop.
Save nivleshc/fd3227da862813a936532c1590392039 to your computer and use it in GitHub Desktop.
This is a part of the CreateNewADForest DSC Configuration function. It defines a new PSCredential object in the domain\user format
[System.Management.Automation.PSCredential]$DomainCreds = New-Object System.Management.Automation.PSCredential ("${DomainName}\$($Admincreds.UserName)", $Admincreds.Password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment