Created
March 29, 2021 20:58
-
-
Save expiscornovus/b69bb974d730e912eb90397007a78b9f to your computer and use it in GitHub Desktop.
Create New Managed Account in SharePoint 2010
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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