So we have spent an amount of time (hopefully not too much ha) configuring the User profile service and the synchronisation which imports profiles from AD. Our filters are in place so we only have valid profiles.
For the next step we would like to automatically create all the mysites in one hit.
This may or may not be a good idea depending on your exact business requirements but if it is what you want here is a script which will iterate through the profiles and create you a my site for each user.
$site = new-object Microsoft.SharePoint.SPSite("http://mysitehost");
$ServiceContext = [Microsoft.SharePoint.SPServiceContext]::GetContext($site);
$ProfileManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServiceContext);
$AllProfiles = $ProfileManager.GetEnumerator();
foreach($profile in $AllProfiles)
{
$profile.CreatePersonalSite();
}
Great fun don't you reckon.
My name is Phil Izod and I have been working with Microsoft 365 and related technologies (with a lot of SharePoint) since 2005. I thought it might be helpful to the community if I shared some of my experiences. Feel free to leave comments if you wish; it’s great to know whether the information is helpful or not.
Showing posts with label PowerShell. Show all posts
Showing posts with label PowerShell. Show all posts
Monday, 18 July 2011
Monday, 18 April 2011
SharePoint 2010 : Verbose diagnostic logging by powershell
A simple one really, but if you want to turn on verbose diagnostic logging when central admin is being a troubled soul this command can be used in the PowerShell command window.
Set-SPLogLevel -TraceSeverity Verbose -EventSeverity Verbose -verbose
More info at : http://technet.microsoft.com/en-us/library/ee748656.aspx#section3
Take care for now.
Update
Thought I might as well put this in here too. If you want to update in STSADM you can with:
stsadm -o setlogginglevel -tracelevel verbose
SharePoint your lives away.
Set-SPLogLevel -TraceSeverity Verbose -EventSeverity Verbose -verbose
More info at : http://technet.microsoft.com/en-us/library/ee748656.aspx#section3
Take care for now.
Update
Thought I might as well put this in here too. If you want to update in STSADM you can with:
stsadm -o setlogginglevel -tracelevel verbose
SharePoint your lives away.
Subscribe to:
Posts (Atom)