These scripts helps for manage MOSS Profile Users or SPUsers information
The first script checks each SPuser (SharePoint User) existence in each Site Collection of the given Web Application if exists.
The script calls the Active Directory for each user with the login name of the SPUser.
You can execute the script with this command :
- Check-SharePoint-Orphaned-Users.ps1 > orphaned_users.txt
After execution open the txt file and use the second PowerShell script for SPUser deletion :
The second script shows all information about a MOSS Profile User (given by his login)
- Get-MOSS-Profile-User-Details "http://myWebApplication" "DOMAIN\Login"
The third script synchronizes all Site Collections User information between SharePoint (WSS or MOSS) and Active Directory
- For execute this script, you have to :
- Open the PS1 file
- Modify the line 198: [ Set-UserInfoDetails "http://mySharePointWebApplication" "LDAP://DC=MyControler,DC=MyDomain,DC=com" ] with your internal parameters
- Execute the script by use the file name "Set-WSS-UserInfo-From-ActiveDirectory.ps1"
All the User data will receives the information, you can modify the script if you have extended data.
The forth script shows you the permissions for the specified user in all sites and lists in a web application
- For execute this script
- You have to modify the two lines:
[string]$userlogintocheck = "DOMAIN\User_login"
ListUsersForAllCollections "http://myWebApplication" $userlogintocheck
- Execute the script by the file name
The fifth script reproduces the behavior of the command STSADM -o migrateuser. More added value to come (batch migration and subsequent updates)
The sixth script:
- dumps information about a SharePoint site group into an XML file
- creates a new SharePoint site group using a file previously created by this script or a manually composed file as input
- adds members to a SharePoint site group using a previously created by this script or manually composed file as input
- clears all members from a SharePoint group
The seventh script lists all the site groups and their members in a site collection in XML format
The eighth script load all the Active Directory Users from the given OU to a given SharePoint contacts list
You can modify the script file for adapt the Active Directory connection string (With the possible Organization Unit) and the Contact list Name and URL
- Set-UserInfoDetails "http://myWebApplication/sites/MySiteCollection" "My Contact ListName" "LDAP://OU=MYActiveDirectoryOU,DC=MySubDomain,DC=MyDomain,DC=COM"
The script manage the Insert and Update, not the delete, you can uncomment the "QuickCleanAllListItems" function call for that
- QuickCleanAllListItems "http://myWebApplication/sites/MySiteCollection" "My Contact ListName"
The ninth script retrieves effective permissions for a specified Windows user/group account or all accounts for any part of a SharePoint web application.
It is commented in a style compatible with the PowerShell V2 comment-based help feature, so you can obtain full usage information by running:
- Get-Help .\Get-EffectiveSPPermissions.ps1 -detailed
The tenth script load all the MOSS Profiles in a SQL Server DataBase (specified in the connection string, with the given table name).
You have also to modify the URL of your MOSS farm at the end of file.
The file is executed directly with his name.
The eleventh script export all the MOSS Profiles in an XML file.
The file is executed directly with his name.
The twelfth script create a SharePoint MOSS Audience with the specified values and compile it
The Thirteenth script create or list the SharePoint MOSS Personalized links
The Fourteenth script create a job and execute the profiles Import
Marc Lognoul [MVP]
Fabrice Romelard {