In order to schedule a SharePoint PowerShell script to be run on specific time in Windows Server 2008 R2, perform the following procedures.
- Save your PowerShell script into some folder location with .ps1 extension.
- Create a new task in Windows task scheduler. Specify the user account the PowerShell script to use when running.
- In Actions, add new action of type “Start Program”. In the Program/Script section, provide full path of “PowerShell.exe” file. That is, “C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe”.
- In the Add Arguments field, it needs two arguments. One is the path to SharePoint Administration Console file and the other is the path to your PowerShell script file. This can be provided as follows:
The “Start in” optional filed has to be provided as the folder location where your script resides if your script uses current folder for getting resources files or saving log files.
Set other necessary options such as Triggers, Conditions etc. and save the task.
- -PSConsoleFile "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\psconsole.psc1" -Command " & ‘<folder path>\<your script file>.ps1’ "
You may see this error when opening browser enabled InfoPath forms published into SharePoint 2010 forms libraries. The reason is, the form may have an associated data connection file (.udcx) which stores external data source connection details such as user name and password and the SharePoint farm is not configured to allow saving external data connection information in data connection files. To get rid of the error you will have to make the following changes in InfoPath Form Services settings.
Navigate to Central Admin > General Application Settings > Configure InfoPath Forms Services
Check the options “Allow embedded SQL authentication” and “Allow user form templates to use authentication information contained in data connection files” under the “Authentication to data sources” section.