Wednesday, December 16, 2015

How to task Scheduler in SharePoint Power Shell Script


  • Create a notepad file
  • Save  that file .bat format
  • Include this code that .bat file


Powershell.exe -executionpolicy remotesigned -File  D:\TScripts\getfarmdetails.ps1



  • Create a notepad file 
  • Save  that file .ps1 format
Type 1:
Add-PSSnapin Microsoft.SharePoint.Powershell

(get-spfarm).buildversion

Type 2:
Add-PSSnapin Microsoft.SharePoint.Powershell
 Get-SPFarm | Select BuildVersion

No comments:

Post a Comment