Created
September 7, 2016 15:08
-
-
Save goyuix/c46bed5165aa6e6a9cb0f778068e9ebb to your computer and use it in GitHub Desktop.
These are first few lines I add to all my SharePoint on-premises scripts. It makes sure that the script is running with admin privileges and loads the Microsoft.SharePoint.PowerShell module. If there are any issue it aborts the script. It pulls some inspiration from the SharePoint Management Shell initialization script sharepoint.ps1.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment