Getting “Can’t find the drive. The drive called ‘IIS’ does not exist.”

The drive is provided by the WebAdministration module, so you need to install/import that module first.

How you install the module depends on your actual system and whether you use GUI or PowerShell. On a Windows Server 2008 R2 for instance you’d install the module with the following PowerShell commands:

Import-Module ServerManager
Add-WindowsFeature Web-Scripting-Tools

After the module is installed you can load it in your script like this:

Import-Module WebAdministration

Leave a Comment

tech