Prince
 New Member Posts:6

 |
| 18 May 2009 01:47 AM |
|
Hi,
i would like to know how to use powershell in sharepoint. I have a list
of projects name in an Excel file and i need to create new project based on the
project name i have in the Excel file.What i know is i create new
project manually but i was told that powershell is able to do this
automatically by typing some script however, i dont know how to script
it and new to sharepoint. Is there anyone that can help mi. Thank You. |
|
|
|
|
halr9000 PowerShell MVP, Site Admin
 Advanced Member Posts:565

 |
|
Craig Pilkenton
 New Member Posts:11

 |
| 18 May 2009 05:46 AM |
|
Hal hits it exactly in that understand Powershell's capabilities & syntax first, which will then teach you how to call and manipulate SharePoint's .NET 2.0 Libraries, along with all the other awesome features of Powershell. |
|
Craig Pilkenton
SharePoint Engineer
|
|
|
Prince
 New Member Posts:6

 |
| 18 May 2009 06:07 PM |
|
Thx for the reply, i have installed a powershell 1.0 from the Microsoft website is it the same? I noe i need sometimes to learn powershell however, i hav to give the task this week therefore lookin for help for this project. Making it abit rush. |
|
|
|
|
Craig Pilkenton
 New Member Posts:11

 |
| 19 May 2009 04:53 AM |
|
Powershell 1.0 is the 'training-version' for the upcoming 2.0 version. It will give you all the functionality you need to get started as until 2.0 is finalized, I am still using 1.0 to do all my work. When you say "...create new project based on the project name i have ...", do you mean a new subsite under an existing site/parent? I can help you with the syntax and objects you'll need to get going.
|
|
Craig Pilkenton
SharePoint Engineer
|
|
|
Prince
 New Member Posts:6

 |
| 19 May 2009 07:26 PM |
|
Yup, creating a new subsite in sharepoint. Meaning i have a list of site to be created in an excel file, and want to use powershell to auto grab the name of the sites from the excel file and create them in sharepoint. |
|
|
|
|
Craig Pilkenton
 New Member Posts:11

 |
| 20 May 2009 06:30 AM |
|
To grab the values out of Excel you can use Import-CSV cmdlet or pull in the .NET library called System.IO.File. Then you'll be able to walk through the resulting objects and pull the values out you need. |
|
Craig Pilkenton
SharePoint Engineer
|
|
|