Category «PowerShell»

Powershell: Split text file in multiple files

  I had a rather big file with 35000 items in it. I wanted to take a phased approach and found a script to split the CSV file based on a number of lines per file. Script Center repository:”http://gallery.technet.microsoft.com/scriptcenter/PowerShell-Split-large-log-6f2c4da0 I tweaked the script a little bit, so only the parameters that are necessary are File …

Site Migration using PowerShell in SharePoint 2010

The content migration APIs provide a simple but flexible solution for migrating content between SharePoint Foundation Web sites. You can export the content from a SharePoint site, along with any dependencies (for example, security, roles, versioning, and other metadata), into single or multiple XML-formatted files called content migration packages. On import to the destination Web …

SharePoint 2010 Security Reporting using PowerShell

SharePoint makes it pretty easy to assign very granular permissions to various elements of a SharePoint site. The problem is that managing those granular permissions over the long haul can be a pretty daunting task. Sure, you start off with the best of intentions: create groups, assign permissions to groups, put users in groups. But …

Create a new Sharepoint 2010 Web Application and Site collection using PowerShell

Microsoft Sharepoint 2010 is one of the new products which supports Windows Powershell commands. Its really easy to do the most tasks you do normally in the Sharepoint Central Administration with Powershell. Microsoft created a Powershell Snapin for Sharepoint 2010, which is called “Microsoft.Sharepoint.Powershell”. This enables a lot of new Powershell cmdlets for Sharepoint. With …

Manage SharePoint 2010 Services with PowerShell

As you may already know, you can use the “Manage Services on Server” option from Central Administration to centrally start and stop service instances across all SharePoint servers in your farm. An example of this administration page is shown below: The issue with this page is that it can be cumbersome to use if there …

Finding Site Template Names and Template ID’s in SharePoint 2010 using PowerShell

SharePoint 2010 includes the new Get-SPWebTemplate cmdlet for getting a list of site templates from the farm. You can use it by typing the following command (note that I am also sorting the table by template internal name): Get-SPWebTemplate | Sort-Object “Name”   This can be quite useful, especially if you want to use PowerShell …