mkellerman / Invoke-CommandAs

Invoke Command As System/Interactive/GMSA/User on Local/Remote machine & returns PSObjects.

Home Page:https://www.powershellgallery.com/packages/Invoke-CommandAs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

he term 'Register-ScheduledJob' is not recognized as the name of a cmdlet....

amnich opened this issue · comments

add 'Import-Module PSScheduledJob' inside the scriptblock of invoke-command cos it throws an exception:

The term 'Register-ScheduledJob' is not recognized as the name of a cmdlet, function, script file, or 
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

What version of Powershell are you trying to run this on? And what OS?

After some testing, I believe the minimum requirement for this script would be PowerShell 3.0 on the remote machine.