One on the really nice things, and the greatest features (and In My Humble Opinion the BEST reason to by Windows 7 and Server 2008R2) is the fact that Powershell “Newest Version as yet unnamed” is PART of the operating system.
No download needed. No “Add a role”.
And wouldn’t you know it? A nice little editor for those of us who are not quite happy with the debugging features of “NOTEPAD”.
But here’s an indication of just HOW much Powershell is a part of the Administrator and the Users’ lives now.
I did a search for a sample PS1 file in Windows 7. Didn’t know where to look, didn’t care, just a random search.
I do these kinds of things you know.
I expected to find a file or two.
Well what a surprise I received! Primarily diagnostics but there are over 400 (FOUR HUNDRED) PS1 (Powershell Script) files NATIVE to Windows 7. I haven’t even looked at my copy of Server 2008R2 yet!
These are all functions that Windows calls up regularly
Take a look at the RS-Themes.PS1 file
# Copyright © 2008, Microsoft Corporation. All rights reserved.
# You may use this code and information and create derivative works of it,
# provided that the following conditions are met:
# 1. This code and information and any derivative works may only be used for
# troubleshooting a) Windows and b) products for Windows, in either case using
# the Windows Troubleshooting Platform
# 2. Any copies of this code and information
# and any derivative works must retain the above copyright notice, this list of
# conditions and the following disclaimer.
# 3. THIS CODE AND INFORMATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND,
# WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. IF THIS CODE AND
# INFORMATION IS USED OR MODIFIED, THE ENTIRE RISK OF USE OR RESULTS IN CONNECTION
# WITH THE USE OF THIS CODE AND INFORMATION REMAINS WITH THE USER.
Import-LocalizedData -BindingVariable localizationString -FileName CL-LocalizationData
Write-DiagProgress -activity $localizationString.themesResolve-progress
# check the Uxsms service startup tpe
$startupType = (Get-WmiObject -query "select * from win32-baseService where Name=’Themes’").StartMode
if($startupType -ne "auto" -and $startupType -ne $null)
(Get-WmiObject -query "select * from win32-baseService where Name=’Themes’").changeStartMode("automatic") > $null
WaitFor-ServiceStatus "Themes" ([ServiceProcess.ServiceControllerStatus]::Running)
Without knowing the full details, it appears this one script has something to do with The Aero themes (either turning them on or off) But ignoring this one script it is ABSOLUTELY AMAZING to see what a level Powershell plays within the operating system. It’s no longer an add-in. It is hard coded and embedded with the system. Which means Administration software uses it.
Which means your life as an Administrator is about to get easier. As More and more of Windows is based upon Powershell scripts (including the Server and various applications) it will be far easier to control via Group Policy and Powershell scriptings how things need to run.
Ohhhhhhhh I can’t wait to get this in action at work!
The Energized Tech