Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Simple question: Can I avoid using NETSH in Windows Server 2008 R2 and instead use PowerShell CmdLets to manipulate things like HTTP?

If so, what are some CmdLets to get me started and are they part of some extra module?

share|improve this question
up vote 1 down vote accepted

There's a NetAdapter module in Powershell 3.0 which appears to cover the functionality of netsh, however the module only ships with Windows 8 or Windows Server 2012, so you're still stuck with netsh or CIM/WMI on Windows Server 2008 R2.

Although unrelated to netsh question, version 3 added an invoke-webrequest cmdlet which is includes in 2008 R2 and Windows 7.

share|improve this answer
Chad, this is close to an answer as I think it gets today and led me to the documentation about the whole arsenal of PowerShell CmdLets in Server 2012. – Luke Puplett Nov 28 '12 at 14:11

powershell is running on top of .NET so you should be able to do whatever you want with http for example here is a simple RSS function :

function RSS{
    Param ($Rssurl='')
    $proxy = New-Object System.Net.WebProxy("")
    $Webclient = new-object net.webclient 
    $Webclient.UseDefaultCredentials = $True
    $rss = [xml]$Webclient.DownloadString($Rssurl)
    $ | ForEach {
    New-Object PSObject -Property @{
        Title = $_.Title
        PublicationDate = (Get-Date $_.PubDate)
        Link = $_.Link

here is an other example in pure PS to change the network card settings :

$card=Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "IPEnabled=true"
if($profile -eq 'dhcp' ){
    write-host OK -ForegroundColor 'green'
# manual IP settings :
share|improve this answer
Although useful, and I'll +1, I will keep the question open to see if anyone knows of some simple 'purpose built' CmdLets that are intentionally designed to replace NETSH as the way to fiddle with things like HTTP.sys port registrations. – Luke Puplett Nov 28 '12 at 12:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.