Hey
I am Amrendra, I need to get the physical path of the websites present in the IIS using powershell script. When, I executed command "Get-Childitem IIS:\", I found an error
Get-ChildItem : Cannot find drive. A drive with the name 'IIS' does not exist.
At line:1 char:1
+ Get-ChildItem IIS:\
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (IIS:String) [Get-ChildItem], DriveNotF
oundException
+ FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.GetChildIte
mCommand
and when I executed "Import-Module WebAdministration", I found following error.
Import-Module : The specified module 'WebAdministration' was not loaded because no
valid module file was found in any module directory.
At line:1 char:1
+ Import-Module WebAdministration
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (WebAdministration:String) [Import
-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.Im
portModuleCommand