Ho pensato che indipendentemente dal sistema operativo in uso, se avessi installato Powershell, avresti accesso agli stessi cmdlet predefiniti.Powershell 4 Get-ScheduledTask e Windows
Quindi voglio usare Get-ScheduledTask sulla mia macchina Windows 7. Ho installato Powershell 4. Tuttavia, quando l'eseguo, ottengo l'errore:
Get-ScheduledTask : The term 'Get-ScheduledTask' 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.
At line:1 char:1
+ Get-ScheduledTask
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-ScheduledTask:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Se corro sul mio Windows PowerShell 8.1 con 4 già pre-installato con il sistema operativo, funziona.
Posso ottenere i cmdlet sul mio computer Windows 7? Non c'è nulla nella pagina Microsoft Get-ScheduledTask su Windows 7 quindi non sto indovinando.
Se poi non sarebbe che si tratti di un caso di usare la linea di comando:
Non c'è dubbio che qualcuno mi puntare a this question, ma che è stato per PowerShell 2. Sono in Powershell 4.
Ora sono un grande fan di non reinventare la ruota, ma questo guys scripts sembra una buona alternativa.