Hi,
I am trying to update a SharePoint site, which involves running serveral powershell scripts. Some of these scripts spawn another process using the following line. However, the process doesn't seem to be working properly and ends rather quickly and of course does not do what it is supposed to. (If the script is run on its own, it works). Can anybody tell me how to get this process to spawn properly?
-------------------------------------start code section---------------------------------------------------------------------------
Start-Process powershell.exe -ArgumentList ".\01-BJCBlogs-SyncRunner.ps1 -targetURL '$url' -backupFileLocation '$backupFile' -clientName '$name' - siteName '$targetSiteName'" -WindowStyle Minimized
Start-Sleep 10
$counter ++
if($counter -gt 2)
{
Start-Sleep 1800
$counter = 0
}
----------------------------------End code section-------------------------------------------------------------------------------
thanks,
Sherazad.