You can try to run the following command in the task scheduler:
%SystemRoot%\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" -command "&{C:\scripts\Hourly.ps1}"
You can try to run the following command in the task scheduler:
%SystemRoot%\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" -command "&{C:\scripts\Hourly.ps1}"