Alexandra
Alexandra

Reputation: 27

I want to install IIS in PowerShell 2.0 or 3.0

I have to create a script which installs the IIS, in PowerShell 2.0 or 3.0. Is it possible? I can't find commands such as get-webapplication or add-windowsfeature. I just need an idea, not the whole script.

Upvotes: 0

Views: 291

Answers (2)

Bruce
Bruce

Reputation: 1623

I believe you'll find add-windowsfeature in the servermanager module

import-module servermanager
add-windowsfeature web-Server
add-windowsfeature web-App-Dev

Upvotes: 0

Eris
Eris

Reputation: 7638

Chocolatey has this feature already, Usage: https://github.com/chocolatey/chocolatey/wiki/CommandsWindowsFeatures

Upvotes: 1

Related Questions