TheTaylorLee / AdminToolbox

Repository for the AdminToolbox PowerShell Modules
MIT License
191 stars 23 forks source link

Invoke-Servicerecovery #14

Closed TheTaylorLee closed 3 years ago

TheTaylorLee commented 3 years ago

Invoke-Servicerecovery doesn't work in powershell version 7, because for some reason the computername parameter was removed prior to Microsoft.PowerShell.Management version 7.

I need to add in a fix that imports get-service function from PowerShell into pwsh, or I will need to change the invoke service restart method.

TheTaylorLee commented 3 years ago

Added a break if running PowerShell core or Pwsh. Function will error and state to run in PowerShell 5 instead. The need was not great enough to re-write the entire function.