Expanding Dmitry’s PowerShell in Server Core…

CAUTION:  THIS IS NOT SUPPORTED BY MICROSOFT

I have to admit that Dmitry’s Blog is an interesting one but I had to work a little bit more to make this work.

Loading the "Visual C++ Redistributable" on the Server Core …easy.

Download the "full redistributable package for .NET 3.5" … take some time and I saved it on my developer computer.

Unpacking the ".NET Framework 3.5 package" step, here’s where I did some things differently:

1. I mapped a drive to my Server Core ("z:").

2. I created the "c:\deploy" folder on my computer.

3. On my computer, I ran the "dotnetfx35.exe /x c:\Deploy" on my PowerShell prompt.

4. Now, you can execute Dmitry’s "Deploy.cmd" on the Server Core.

Following Dmitry’s blog I found myself lost when trying to install the "Windows Server 2008 SDK and .NET Framework 3.5" because it leads you to believe you can run the setup on the server core.  In my case, I couldn’t run setup. So, I figured out a workaround:

1. On your computer, if its already installed, just remove it and a restart will be required.

2.   Following Dmitry instructions, run the Install and selecting only the to install the "Win32 Development Tools". Again, a restart may be required.

3. Continuing on your computer, you may proceed to install the "Orca" component.

4. Now, you can continue with Dmitry instruction on how to modify the "NetFx20a_x..msi".

5. After complete modifying the "NetFx20a..", go back and modify your Windows SDK to include all other components.  I didn’t need to restart my computer.

6. Now your "NetFx20a_x86.msi" (or 64) ready. Just Drag/Drop your "c:\Deploy" folder to the Server Core.

7. Proceed to do the "2.5 Install .NET" step.   Hint: you could create a cmd file to eliminate typo errors.

Now, download "PowerShell V2 CTP2". Save/Execute the file on you Server Core and it should install without any problems. But, you might get an error the first time you try.

 

The PowerShell installation file security property might come "block".  So, you need to change it to "unblock".  And, now your PowerShell installation will process:

On the Server Core, I create a "PS.cmd" using the most famous editor in the world: (Any Guess?):

Let’s execute "PS.cmd" from the Core Command and …. Hurray!!!!  I got PowerShell on Server Core:

But, wait, let make it more interest for testing purpose.  Let go further with Dmitry’s Blog, on the Server Core its a good idea to enable WinRM service:

So, from my computer, this will allow me to remotey query the Server Core using either powershell and/or DOS commands:

For sure, its going to be a limited PowerShell on Server Core but I will have more detail test on my blog later on.

Well, I hope you put it to work and do your own test.

Have a happy PowerShell day!! and once again THANKS to Dmitry for a great blog.

Advertisements

About maxt2posh

I’m from Puerto Rico, have been working with computers since 1979. Throughout many years, I have worked with SQL Server Technologies, provided support to Windows Servers/Client machines, Microsoft Virtualization Technologies, and build some Visual Studio solutions. I’m a Microsoft PowerShell MVP since 2009 and MVP SAPIEN Technologies since 2010. I speak in most of the SQLSaturday, IT Pro and .NET camps events around the Florida’s State. Also founder of the Florida PowerShell User Group which meeting every 3rd Tuesday evening of the month.
This entry was posted in PowerShell. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s