Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 136

Get physical path from IIS using powershell script

$
0
0

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


Viewing all articles
Browse latest Browse all 136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>