When trying to stop/start IIS application pool on a remote server using
Invoke-Command -ComputerName $HostName -ScriptBlock {
param($ServiceName)
Start-WebAppPool -Name $ServiceName
} -ArgumentList ($ServiceName)
I receive an error
Process should have elevated status to access IIS configuration data.
Cannot find drive. A drive with the name 'IIS' does not exist.
+ CategoryInfo : ObjectNotFound: (IIS:String) [Start-WebItem], DriveNotFoundExceptio
n
+ FullyQualifiedErrorId : DriveNotFound,Microsoft.IIs.PowerShell.Provider.StartItemCommand
+ PSComputerName : server123
I've discovered some answers here concerning this error. So, the question - is having admin rights (= including my user into Administrators group) on target machine obligatory to have an ability just to start/stop application pools?