Skip to content

Instantly share code, notes, and snippets.

@expiscornovus
Created March 29, 2021 20:58
Show Gist options
  • Save expiscornovus/b69bb974d730e912eb90397007a78b9f to your computer and use it in GitHub Desktop.
Save expiscornovus/b69bb974d730e912eb90397007a78b9f to your computer and use it in GitHub Desktop.
Create New Managed Account in SharePoint 2010
Import-CSV .\managedaccounts.csv | ForEach-Object {
$username = $_.UserName
$password = $_.Password | ConvertTo-SecureString -asPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential($username,$password)
new-SPManagedAccount -Credential $credential
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment