How to Install PowerShell on Windows Server 2003 and Enable Remote PowerShell Management–All Servers Should Have This Done


PowerShell is an incredible tool that will allow you to run scripts or commands on your server.  PowerShell is included with Windows Server 2008 R2 but it has to be added to Windows Server 2003.  I recently had a customer who got their server (DC) infected with a virus and it was a huge problem to do anything to the box because when they logged in (with any user) the virus kicked in and prevented them from running anything. Remote Management was NOT enabled on the server so they were in big trouble. If they had PowerShell installed this monumental problem would have been nothing but an annoyance.  So, take a bit of advice and install PowerShell on all your servers, just in case you ever need the power of PowerShell on your server you will have it available.   You must be on Windows Server 2002 Service Pack 2 (SP2) in order to use PowerShell v2.

First you need to download and install “Windows Management Framework” (Which gives you Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0) Details on this package as well as the download links can be found here http://support.microsoft.com/kb/968929

In this customers case they would have downloaded

Windows Management Framework Core (WinRM 2.0 and Windows PowerShell 2.0)

from:

DownloadDownload the Windows Management Framework Core for Windows Server 2003 package now. (http://www.microsoft.com/downloads/details.aspx?FamilyId=f002462b-c8f2-417a-92a3-287f5f81407e)

Or if they had a 64bit OS …

DownloadDownload the Windows Management Framework Core for Windows Server 2003 x64 Edition package now.

This will install as an OS Hotfix.  When I did it on my 2003 server, it did not create an icon for the PowerShell.exe program. 

I simply clicked Start-Run typed in powershell <ENTER> and PowerShell launched.  When I ran it the first time, PowerShell was automatically added to my freqently used programs but if you are not so lucky, you can manually create an icon for it.  The Powershell Executable is located at c:\windows\system32\WindowsPowerShell\v1.0\PowerShell.exe

You will want to make sure that remote management and WMI is enabled on the server. 

Start – Run – services.msc <ENTER>

Scroll down and find: Windows Management Instrumentation and Windows Remote Management (WS-Management) and make sure they are both started and set to run automatically.

Now, we need to enable remote sessions: 

Open PowerShell on the Windows 2003 Server and run the command Enable-psRemoting.

Open PowerShell Window

Enable-psRemoting <ENTER>

Now you should be able to go to a different computer that has powershell enabled and test connecting to the 2003 machine.  I my case I am connecting to the 2003 machine from a Windows 2008 R2 machine. From a 2008 R2 machine, open a PowerShell Windows and type in

If you have not enabled-psRemoting on the 2008 R2 box go ahead and do that while you are there. Let’s try the following from the 2008 machine to connect and remotely manage the 2003 machine

Open PowerShell windows and type…

Enter-psSession MachineName <ENTER>

Any commands you want to run will now run on the remote machine  see screenshot

to end your remote session type

Exit-psSession <ENTER>

PowerShellRemoteSessions

 

If you like this post, please contact me on Twitter @ITProGuru to let me know.  To keep from missing other posts, make sure you add an RSS to my blog.

Comments (10)

  1. Mike Hatfield says:

    Thanks for the article, it was very helpful for me. Unfortunately I'm holding back on installing powershell on a 2k3r2 production box due to it being a service monitor server. I need to figure out a way to install with no restart or schedule a maintenance just to install powershell. 🙁

  2. Al says:

    "You must be on Windows Server 2002" – what version?

  3. Christine says:

    Easy to follow and works perfectly.  Thank You!!!

  4. modris says:

    Nice article, BUT

    You need change one mistake in "You must be on Windows Server 2002 Service Pack 2 (SP2) in order to use PowerShell v2."

    I indicate on Server 2002 (???).

  5. khalid z. says:

    Very very helpful.
    Thank you

  6. jdw35 says:

    To enable an HTTPS listener on the host:

    New-WSManInstance -ResourceURI winrm/config/Listener -SelectorSet @{Transport=”HTTPS”;Address=”IP:x.x.x.x”} -ValueSet @{Hostname=”host.fqdn.name”;CertificateThumbprint=”xxxxxxxxxx”}

    Obviously replace x.x.x.x, host.fqdn.name and xxxxxxxxxx with the appropriate values.

    On the client:

    Enter-psSession -ComputerName host.fqdn.name -Credential machine-or-domainuser -UseSSL

    The client needs to trust the host CA, so place the host’s CA certificate in the machine trusted CA store.

  7. jdw35 says:

    Forgot to add:
    Make sure that the host certificate is issued to the correct host FQDN name and is in the machine personal store.

  8. krish says:

    does the Microsoft Licensing applies if we install this in the Windows 2003 server

  9. show box says:

    Thanks for the great info. I really loved this. I would like to apprentice at the same time as you amend your web site, how could i subscribe for a blog site?
    For more info on showbox please refer below sites:
    http://showboxandroids.com/showbox-apk/
    http://showboxappandroid.com/
    Latest version of Showbox App download for all android smart phones and tablets.
    http://movieboxappdownloads.com/ – It’s just 2 MB file you can easily get it on your android device without much trouble. Showbox app was well designed application for android to watch movies and TV shows, Cartoons and many more such things on your smartphone.
    For showbox on iOS (iPhone/iPad), please read below articles:
    http://showboxappk.com/showbox-for-ipad-download/
    http://showboxappk.com/showbox-for-iphone/
    Showbox for PC articles:
    http://showboxandroids.com/showbox-for-pc/
    http://showboxappandroid.com/showbox-for-pc-download/
    http://showboxforpcs.com/
    There are countless for PC clients as it is essentially easy to understand, simple to introduce, gives continuous administration, effectively reasonable. it is accessible at completely free of expense i.e., there will be no establishment charges and after establishment
    it doesn’t charge cash for watching films and recordings.
    http://www.showboxforipad.org/showbox-apk/ Not simply watching, it likewise offers alternative to download recordings and motion pictures. The accompanying are the strides that are to be taken after to introduce Showbox application on Android. The above
    all else thing to be done is, go to the Security Settings on your Android telephone, Scroll down and tap on ‘Obscure sources’.
    http://www.showboxforipad.org/
    http://movieboxappdownloads.com/moviebox-apk-android/
    http://movieboxappdownloads.com/download-moviebox-pc/
    Movie Box, an esteemed movies application in which you can find stacks of programs and films. The guide is given here to download Movie Box app to Android and to Apple iOS 9.0.2, iOS 8.4/8.3 and also for the lower versions without Jailbreak.
    http://showboxforiphone.org/
    Please do login to Showbox application with the help of Ymail. You can login in Ymail from here –
    http://ymaillogintips.com/
    Sign Up & Do registration for latest movies on Showbox application

  10. akki says:

    Thanks for the great info. I really loved this. I would like to apprentice at the same time as you amend your web site, how could i subscribe for a blog site?

    http://www.movieboxapkdownload.com/ – It’s just 2 MB file you can easily get it on your android device without much trouble. Showbox app was well designed application for android to watch movies and TV shows,
    Cartoons and many more such things on your smartphone.
    http://www.aptoideapkdownload.com/ – It’s just 2 MB file you can easily get it on your android device without much trouble.

    http://www.vidmatedownloadapk.com/

    Showbox app was well designed application for android to watch movies and TV shows, Cartoons and many more such things on your smartphone.

    http://www.shareitforpccdownload.com/

    http://www.shareitforpccdownload.com/shareit-for-pc-windows-10-8-1-7-mac-free-download/

    SHAREit for PC lets you transfer files between devices like phones, tablets and computers. With the wide area of sharing compatibility, sharing across anything is easy now. This is the best and the fastest alternative for USB sharing.