© Rossella Apostoli, 123RF.com

© Rossella Apostoli, 123RF.com

The best cmdlets for PowerShell

The Horse's Mouth

Article from ADMIN 14/2013
By
Windows is no longer the system for mouse pushers. In the latest server version, the default installation installs without a GUI, and management via PowerShell is a part of everyday life for Windows administrators.

In PowerShell 3.0, Microsoft lets admins manage, install, or adapt virtually any service on a Windows server via the shell. In this article, I introduce some of the new and interesting commandlets (cmdlets) that can make an admin's life easier. For example, the new Show-Command directive explains the use of other parameters in more detail, and with an Internet connection, you can update the help files in PowerShell using Update-Help.

Core Server with a GUI

For Windows Server 2012, installing as a core server is the recommended Microsoft approach and is selected by default. An important innovation in Windows Server 2012 is the ability to install the graphical interface in the PowerShell later on, which means you can convert a core server into a full-fledged server with a graphical interface, and the installed services will not be affected by the change. To do this, type powershell at the command prompt, and then type

Install-WindowsFeature Server-Gui-Shell

in the PowerShell session. After a few minutes, the server reboots, and you have Windows Server 2012.

If you install a Core Server, the server lacks the binaries for installing the graphical interface. You must either configure an Internet connection for the server so that it can download the required data from Windows Update or specify the folder containing the Windows Server 2012 installation files. To install on a Core Server, you need to run:

Install-WindowsFeature Server-Gui-Mgmt-Infra

You can also connect from a computer on the network using Server Manager. Alternatively, you can use the PowerShell commands:

Import-Module Dism
Enable-WindowsOptionalFeature -online -Featurename ServerCore-FullServer,Server-Gui-Shell,Server-Gui-Mgmt

The following command also installs the graphical interface:

 ...
	
Use Express-Checkout link below to read the full article (PDF).

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Top PowerShell Cmdlets

    Windows is no longer the system for mouse pushers. In the latest server version, the default installation installs without a GUI, and management via PowerShell is a part of everyday life for Windows administrators.

  • Remotely managing web access servers
    The Windows PowerShell web-based console lets you run PowerShell commands and scripts in your browser.
  • Use PowerShell to manage Exchange Online
    Exchange Online in Office 365 can be managed just like its local counterpart with similar, sometimes identical, PowerShell cmdlets.
  • PowerShell Part 1: Retrieving System Information

    Windows administrators, like Unix or Linux administrators, look for ways to perform their duties with ease and elegance through automation. PowerShell allows administrators to gather information, change Registry parameters, work with Active Directory, manipulate services, look at events, work with Windows Management Instrumentation (WMI), and much more. PowerShell is a Windows administrator’s best friend.

  • Security with PowerShell 5
    Despite the growing exploitation of PowerShell's scripting language by hackers, the tool's security features also offer a line of defense.
comments powered by Disqus