spjeff / spbestwarmup

Tired of waiting for SharePoint pages to load? Want something easy to support? That works on all versions? This warmup script is for you!
2 stars 0 forks source link

Issue with missing absolute path for PS1 in double quotes #24

Closed zerod1ce closed 5 years ago

zerod1ce commented 5 years ago

On my Windows Server 2012 R2 Standard with SharePoint Server 2013 (Dec CU 2018) I had to replace line 156 with the following in order to have the PS1 path in double quotes "" and absolute.

156: $cmd = "-ExecutionPolicy Bypass -File "" + $cmdpath + """ + $suffix

The task was throwing an error (Status 0xFFFD0000 / action "PowerShell.exe" with return code 4294770688) without the double quotes and the absolute path.

Probably not an issue, just reporting back - maybe that works better for different Windows Server environments?

spjeff commented 5 years ago

Thank you. Updated line and fixed with commit https://github.com/spjeff/spbestwarmup/commit/38260914c42982d27698492e4d910653acb045fe#diff-316afa53af12494556ef094f27de1d72

rtonerii commented 2 years ago

I found I am getting the same error on some installs, it looks like the PowerShell path is not registered in system variables. I have had to update the full path in the task for it to run.

Just FYI