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:
You can see one of the sample powershell script in my previous blog.
You define variables as:
You define comments inline with # and block with “/<# #>”
Power Shell uses a verb-noun pair.