I wrote a PowerShell script to deploy IIS Website automatically, but when I pass parameters to the script I get the following error:
Cannot find the d
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