Sharepoint PowerShell – Getting started

Being a SharePoint guy let’s start learning PowerShell to get things done in SharePoint from time to time.

To start with I am using notepad and saving the file with extension ps1 in C:\Users\spadmin\test.ps1.
I have used spadmin user to do Remote desktop into the Sharepoint server.

I use SharePoint 2013 management Shell (running as Administrator) to execute the above created powershell script as follows:
.\test.ps1

You can see one of the sample powershell script in my previous blog.

You define variables as:
“$variablename=variablevalue”

You define comments inline with # and block with “/<# #>”

Power Shell uses a verb-noun pair.

Reference:

Reference link 1

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s