Book Image

Getting Started with Powershell

Book Image

Getting Started with Powershell

Overview of this book

Table of Contents (19 chapters)
Getting Started with PowerShell
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Next Steps
Index

The WebAdministration module


Once IIS is installed, we need to import the WebAdministration module to interact with IIS (using Import-Module WebAdministration). Using the Get-Command cmdlet to find the Get- cmdlets in the module is a good way to get an idea about what the module allows us to work with:

Here, we can see that we have cmdlets to deal with sites, virtual directories, applications, bindings, configuration, and much more. Another thing that is worth mentioning at this point is that the WebAdministration module also adds a new PSProvider called WebAdministration and a PSDrive called IIS, which exposes a hierarchical view of the IIS installation. Remember that PSDrives are how PowerShell exposes hierarchical data. In this case, the IIS configuration is treated in a similar way to a drive.

Tip

You try it!

Starting with CD IIS:, explore the IIS installation using the DIR (Get-ChildItem) cmdlet. Don't forget to change back to a filesystem drive when you're done.