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.
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.
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.