PowerShell is a tool that allows us to run scripts or commands on our server. PowerShell is included with Windows Server 2008 or 2008 R2 but not in Windows Server 2003. It is recomended to install PowerShell on all servers. We must be on Windows Server 2003 / 2003 R2 Service Pack 2 (SP2) in order to use PowerShell v2. First we need to download and install “Windows Management Framework” (Which gives us Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0). Download links can be found here http://support.microsoft.com/kb/968929
Windows Management Framework Core (WinRM 2.0 and Windows PowerShell 2.0) from: Download the Windows Management Framework Core for Windows Server 2003 package now. For 64bit OS … Download the Windows Management Framework Core for Windows Server 2003 x64 Edition package now. On Windows 2003 server, it could not create an icon for the PowerShell.exe program. We can manually create an icon for it. The Powershell Executable is located at: C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe Be 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, Let'senable remote sessions: Open PowerShell on the Windows 2003 Server and run the command Enable-psRemoting. Enable-psRemoting <ENTER> Now we can test connecting to the 2003 machine from remote machine. Let's see how to do this from Windows 2008 R2. Open a PowerShell Windows and type in... Enter-psSession MachineName <ENTER> If we are connecting from a machine that is not a member of our domain, we have to provide a credentials in the following format Enter-psSession MachineName -Credential DOMAIN\User
Any commands we want to run will now run on the remote machine. To end your remote session type : Exit-psSession <ENTER>
|