Scheduled Task for PowerShell Script with String Array Parameter

前端 未结 3 770
我在风中等你
我在风中等你 2021-01-19 02:09

I\'ve created a PowerShell script that runs perfectly from the Management Shell. I\'m trying to get it setup to work in a scheduled task in Windows Server 2008 R2 and am uns

3条回答
  •  迷失自我
    2021-01-19 02:55

    I have been using PowerShell for SharePoint and have created several Scheduled Task to trigger them at various intervals.

    This is how i do it and it worked for me all the time.

    Syntax : [Path to ur script'] -Param1Name 'Value1' -Param2Name 'Value2' -Param3Name 'Value3'

    Here is a real example :

    D:\Scripts\Global.ps1 -DataLocation 'D:\Scripts' -DeploymentParameters 'Deploymentparameters' -Deployments 'Deployments' -GlobalParameters 'GlobalParameters' -SiteUrl 'https://my.sp.company.com'

提交回复
热议问题