Windows server administrators are catching up with the newest version of PowerShell: 4.0.
We've compiled a PowerShell tutorial for Windows server admins who are just starting out with the scripting language, learning about version 4.0, or looking for tips and tricks.
Important changes in PowerShell 4.0
Don't want to manually intervene with the servers that often? PowerShell 4.0 introduces parameters for more automated, easily executed jobs.
Version 4.0 focuses on automating administration, with features such as Desired State Configuration, which applies the same roles and settings to multiple nodes, and offers easier signed-script execution for server admins.
One feature that continues to create confusion in version 4.0 is the PowerShell workflow, a PowerShell feature that plays by Windows Workflow Foundation rules. Workflow lets admins run multiple tasks concurrently in the script code, but it excludes certain PowerShell features. If you take the time to learn its requirements, PowerShell workflow pays you back with automation and flexibility.
Benefits of PowerShell scripting
PowerShell scripting is an entirely new language for server admins who are comfortable in a graphical user interface. You don't have to go it alone.
Start by working with an experienced admin's scripts. Generic-purpose scripts will help you adapt the structure and language for your own tasks. Study examples of the script in use.
While learning about PowerShell scripting from your peers, familiarize yourself with these universal tips for server administration from the PowerShell interface. Learn how to search for all available commands and refine your list to the ones that you need for a given task. Think about ease of maintenance and error handling when you write scripts. And enjoy the satisfaction when you figure out a script that accomplishes the task at hand in half as many steps as your first attempt.
Once you work in PowerShell and develop skills, take a look at these dozen pointers, tricks and tips. Depending on your scripting level, you might already know how to parse XML, but what about snapping in your VMware vSphere commands? Perhaps you're used to PowerShell Web Access but you've never enabled PowerShell remoting until now. Scan the list and find an area where you can enhance your repertoire.
Alright, you're a PowerShell expert now. Time to have a little fun with PowerShell pranks.
That's my specialty
Until recently, GUI was the name of the game for Exchange Server admins. PowerShell cmdlets and scripts are the future of Exchange management, and important changes in Exchange 2013 have even PowerShell-confident administrators learning new techniques to get the most out of the interface.
For the virtualization crowd, PowerShell automates virtual machine configuration, management and other tasks. The good news is that the virtualization community shares full-fledged scripts and workflows, such as a way to shut down guest VMs in Hyper-V, or how to export a VM and more. Before you spend all afternoon writing scripts for your virtual environment, check out shared resources from other PowerShell-powered virtualization admins.
For the storage team, PowerShell went from useful to essential with the advent of Windows Server 2012. Get informed on some of the storage management basics on PowerShell as a starting point for fully managing Windows Storage Spaces from the command line interface. For example, learning which cmdlets to use to view the disks vs. the physical disks vs. the available physical disks of a server's storage will help admins create storage pools for the data center.
Dig deeper on Microsoft Windows Server in the data center
Meredith Courtemanche asks:
What's the most difficult part about using PowerShell?
3 ResponsesJoin the Discussion