Quite a common request for working with Windows machines is to report the software installed on them. If you don’t have a centralised system for reporting on client software (many places don’t) then you may turn to some form of scripted method to obtain this information.
Most people tend to head to Add / Remove Programs when thinking about what software is installed in Windows. However, not all applications will always populate information in there, depending on how they have been installed.
Update 30/10/2013: There’s an updated post on the PowerShell Team Blog which now describes this situation with .NET 4.5 as a pre-requisite in more detail.
PowerShell 4.0 which shipped as part of Windows Server 2012 R2 and Windows 8.1 is now available for down-level Windows versions via the downloadable Windows Management Framework 4.0.
WMF 4.0 contains updated versions of the following features:
Windows PowerShell Windows PowerShell Integrated Scripting Environment (ISE) Windows PowerShell Web Services (Management OData IIS Extension) Windows Remote Management (WinRM) Windows Management Infrastructure (WMI)
The other day I noticed some comments on Twitter around the time taken to install VMware vCloud Automation Center 5.2
Being of curious nature I decided to check it out further and in doing so discovered this extensive installation guide from Jad El-Zein. Seeing as a lot of the pre-requisites are installing Windows Roles / Features and configuring IIS, I figured this would make a good candidate for some PowerShell work and might save you some time if you need to do this yourself.
Following on from the blog post Testing TCP Port Response from PowerShell which provided a means to check that servers had fully rebooted after a patching and reboot cycle, I needed to take this one step further and check that all of the Windows Services set to Automatic successfully started after the reboot.
This should be pretty straightforward since we have a Get-Service cmdlet. Unfortunately however, this cmdlet does not return a StartMode parameter, i.
By default, Data Encryption Standard (DES) encryption for Kerberos authentication is disabled in Windows Server 2008 R2, this is a change from Windows Server 2003. If you are running an application which uses DES encryption for Kerberos application, such as SAP, then you may see issues authenticating users against 2008 R2 DCs. You will see errors in the System Log like the below for the users in question:
“While processing a TGS request for the target server %1, the account %2 did not have a suitable key for generating a Kerberos ticket (the missing key has an ID of %3).
To upgrade Active Directory from Windows Server 2003 to Windows Server 2008 R2 requires the usual AD schema upgrade first of all. Windows Server 2008 R2 is 64-bit only, so if you try running the usual command to upgrade the schema from a 32-bit Domain Controller:
you get the following result, “adprep.exe is valid, but if for a machine type other than the current machine.”:
An alternative is to try running it from a 64-bit machine that is not a DC, but then you discover that this process absolutely must be run from a DC:
A new feature in PowerShell V2 is modules. In this article for Simple-Talk I give you an introduction to PowerShell modules and how you might use them.
PowerShell 2 is installed by default in Windows Server 2008 R2. However, the other day I went on to a server with this OS and went to use the PowerShell ISE (which I switched to as my default console a year ago) and found that it wasn’t there:
Turns out that the ISE is not installed by default and needs to be added as a Feature:
This is different to a manual install of PowerShell 2 on Windows 2008 / 2003 where the ISE is included as part of the Windows Management Framework Install.
I had the following issue when upgrading vCenter from 4.0 to 4.1. Whilst the database upgrade and install appeared to complete successfully, the vCenter service would not start once the install was complete.
In the vpxd.log located at C:\Documents and Settings\All Users\Application Data\VMware\VirtualCenter\logs, you see errors similar to:
[2010-07-27 13:42:26.837 03204 error ‘App’] [VpxdMain] Failed to initialize: Not initialized: boolean storageIORMSupported [2010-07-27 13:42:26.837 03204 error ‘App’] Failed to intialize VMware VirtualCenter.