Winnipeg Photographer


How to install any Windows Role from the command line

How To Theory

Recently I was working with Windows 2008 Server Core. I was trying to install a role and quickly missed “Add/Remove Role Wizard”! After doing a bit of research I found that with everything in Windows Core you can run a command that will do the same thing  as it’s GUI counter part. Unless you are very gifted, I doubt any mortal would remember all the roles you can add. To find out what the names of roles you can install you must type the command:

ServerManagerCmd –query

Now that you know how to query the server for roles you are probably wanting to get to the good stuff and actually Install a role you would type:

ServerMangerCmd -i NameOfRole

Example

Now that you know how it works lets install something like Powershell and IIS from the server’s command line. Let’s Go!


Leave a Reply