RSS

Tag Archives: ICT

SCOM2012 – Determine OpsMgr Components File Versions Using PowerShell Remoting

We’re currently working hard on our SCOM 2012 environment. One of the things that need to be done, is upgrading the environment to the latest version, which is currently Update Rollup 3.

Two great blog posts are available to assist you in the upgrade process:

Unfortunately SCOM 2012 at this moment only shows the major version 7.0.8560.0 when using get-scommanagementserver or get-scomagent. For agents you can use this PowerShell command:
get-scomagent | ft computername, version, patchlist -auto
The patchlist is however not available for managementservers, which means another approach is necessary to get an overview of the upgrade status of your SCOM environment.

Since OpsMgr 2012 Update Rollup 3 is available through WSUS now for the first time, you could leverage existing WSUS reports. Depending on your environment, not all systems might be in WSUS or the systems might be using different WSUS servers.

The script I made, is based on Stefan Stranger’s blog post. The script basically works like this:

  1. It queries the SCOM 2012 environment for management servers and agents.
  2. It connects to each management server and agent using PowerShell remoting, locally checks file versions against the desired versions and returns the results.

The script can be found here:
http://bjornhouben-web.sharepoint.com/Lists/Scripts

Since I’m still pretty new to PowerShell scripting, any feedback is welcome so I can improve

[EDIT 22-04-2016]

Added the script as HTML in the blog itself

[EDIT 22-04-2016]

 

<########################################################################################

Name : Determine SCOM Components File Versions Using PowerShell Remoting.ps1

Date : December 10th 2012

Author : Bjorn Houben

Blog        :   http://blog.bjornhouben.com

Website : http://www.bjornhouben.com

Linkedin : http://nl.linkedin.com/in/bjornhouben

Purpose :   Unfortunately SCOM 2012 now only shows the major version 7.0.8560.0 when using get-scommanagementserver or get-scomagent.

                This script will show the file versions of the SCOM 2012 components: Management Server, Gateway Server, Console, Web Console, Agent and reporting tools.

                Using PowerShell remoting, this script will query your SCOM environment for management servers and agents and will then check their local file versions.

                

Assumptions : To query SCOM, you are running the script from a system that meets all of these requirements:

                 1. The “Operations Manager Shell” is installed.

                 2. You can connect to the management server for queries.

                 3. Your account has sufficient permissions to query the management server.

                To query the file versions on remote systems:

                 1. PowerShell remoting must be enabled and configured correctly.

                 2. Connectivity to the remote systems must be available.

                 3. The account used for PowerShell remoting must have sufficient permissions.

Known issues:

Limitations :

Notes   : This script was inspired by Stefan Stranger’s blog post about installing update rollup 3:

                http://blogs.technet.com/b/stefan_stranger/archive/2012/10/22/opsmgr-2012-update-rollup-3-ships-and-my-experience-installing-it.aspx

                To determine the changed files, I used the commands provided in this blog post:

                Get-ItemProperty -Path “$env:ProgramFiles\System Center 2012\Operations Manager\Server\*.dll” | select -ExpandProperty VersionInfo | where {$_.FileVersion -eq “7.0.8560.1036”} | Format-List FileName, FileVersion

                Get-ItemProperty -Path “c:\\Program Files\System Center 2012\Operations Manager\Reporting\Tools\*.*” | select -ExpandProperty VersionInfo | where {$_.FileVersion -eq $SCOM2012_Update_version} | Format-List FileName, FileVersion

                Get-ItemProperty -Path “$env:ProgramFiles\System Center 2012\Operations Manager\Console\*.dll” | select -ExpandProperty VersionInfo | where {$_.FileVersion -eq $SCOM2012_Update_version} | Format-List FileName, FileVersion

                Get-ItemProperty -Path “$env:ProgramFiles\System Center 2012\Operations Manager\WebConsole\WebHost\bin\*.dll” | select -ExpandProperty VersionInfo | where {$_.FileVersion -eq $SCOM2012_Update_version} | Format-List FileName, FileVersion

                Get-ItemProperty -Path “$env:ProgramFiles\System Center Operations Manager\Gateway\*.dll” | select -ExpandProperty VersionInfo | where {$_.FileVersion -eq $SCOM2012_Update_version} | Format-List FileName, FileVersion

                Get-ItemProperty -Path “$env:ProgramFiles\System Center Operations Manager\Agent\*.dll” | select -ExpandProperty VersionInfo | where {$_.FileVersion -eq $SCOM2012_Update_version} | Format-List FileName, FileVersion

Disclaimer : This script is provided AS IS without warranty of any kind. I disclaim all implied warranties including, without limitation,

    any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or

    performance of the sample scripts and documentation remains with you. In no event shall I be liable for any damages whatsoever

    (including, without limitation, damages for loss of business profits, business interruption, loss of business information,

    or other pecuniary loss) arising out of the use of or inability to use the script or documentation.

To improve  :

Copyright   :   I believe in sharing knowledge, so this script and its use is subject to : http://creativecommons.org/licenses/by-sa/3.0/

History     : December 10 2012 : Created script

########################################################################################>

#Load the OperationsManager PowerShell module

Import-Module OperationsManager

#Get managementservers and agents

$ManagementServers = Get-SCOMManagementServer

$Agents = Get-SCOMagent

#Declare function for PowerShell remoting

Function get-remotefileversions($computername)

{

    #Invoke-command is used to perform commands on remote machines using PowerShell remoting. The ScriptBlock defines what will be executed on each local machine.

    invoke-command -computername $computername -ScriptBlock{

        

        #Get the local hostname

        $hostname = $env:COMPUTERNAME

        #Declare the function to get fileversions

        Function get-fileversion($description,$file)

        {

            #Declare the desiredversion.            

            #SCOM 2012 Update Rollup 3 version = “7.0.8560.1036”

            #SCOM 2012 SP1 beta version = “7.0.8925.0”            

            $desiredversion = “7.0.8560.1036”

    

            IF((test-path $file) -ne $true) #If file is not present, no file version check will be performed

            {

                #write-host “Not present;$file”

            }

            ELSE #If file is present, file version check will be performend

            {

                #write-host “Present;$file”

                #Get the fileversion

                $fileversion = (Get-ItemProperty -Path $file | select -ExpandProperty VersionInfo).FileVersion

                

                #Define the outputformat

                $output = $hostname;$fileversion;$description;$file

                IF($fileversion -eq $desiredversion) #If fileversion matches desired version, do not show in output

                {

                    #write-host $output

                }

                ELSE #If fileversion does not match desired version, show in output

                {

                    #Show only non compliant versions

                    $output | write-host

                }

            }

        }

        #Define the files to check

        

        #Files for SCOM 2012 Management Server

        get-fileversion “Management Server” $env:ProgramFiles\System Center 2012\Operations Manager\Server\Microsoft.EnterpriseManagement.DataAccessService.OperationsManager.dll”

        get-fileversion “Management Server” $env:ProgramFiles\System Center 2012\Operations Manager\Server\Microsoft.EnterpriseManagement.Modules.PowerShell.dll”

        get-fileversion “Management Server” $env:ProgramFiles\System Center 2012\Operations Manager\Server\Microsoft.EnterpriseManagement.RuntimeService.dll”

        get-fileversion “Management Server” $env:ProgramFiles\System Center 2012\Operations Manager\Server\MomIISModules.dll”

        #Files for SCOM 2012 Console

        get-fileversion “Console” $env:ProgramFiles\System Center 2012\Operations Manager\Console\Microsoft.EnterpriseManagement.Presentation.Controls.dll”

        get-fileversion “Console” $env:ProgramFiles\System Center 2012\Operations Manager\Console\Microsoft.EnterpriseManagement.Presentation.Core.dll”

        get-fileversion “Console” $env:ProgramFiles\System Center 2012\Operations Manager\Console\Microsoft.EnterpriseManagement.Presentation.DataProviders.Library.dll”

        get-fileversion “Console” $env:ProgramFiles\System Center 2012\Operations Manager\Microsoft.EnterpriseManagement.UI.ConsoleFramework.dll”

        get-fileversion “Console” $env:ProgramFiles\System Center 2012\Operations Manager\Microsoft.Mom.UI.Components.dll”

        #Files for SCOM 2012 Web Console

        get-fileversion “Web Console” $env:ProgramFiles\System Center 2012\Operations Manager\WebConsole\WebHost\bin\Microsoft.EnterpriseManagement.Presentation.Core.DLL”

        get-fileversion “Web Console” $env:ProgramFiles\System Center 2012\Operations Manager\WebConsole\WebHost\Microsoft.EnterpriseManagement.Presentation.DataProviders.Library.dll”

        get-fileversion “Web Console” $env:ProgramFiles\System Center 2012\Operations Manager\WebConsole\WebHost\Microsoft.EnterpriseManagement.Presentation.Security.Cryptography.dll”

        #Files for SCOM 2012 Gateway

        get-fileversion “Gateway” $env:ProgramFiles\System Center Operations Manager\Gateway\Microsoft.EnterpriseManagement.Modules.PowerShell.dll”

        get-fileversion “Gateway” $env:ProgramFiles\System Center Operations Manager\Gateway\MomIISModules.dll”

        get-fileversion “Gateway” $env:ProgramFiles\System Center Operations Manager\Gateway\MOMScriptAPI.dll”

        #Files for SCOM 2012 Reporting

        get-fileversion “Reporting” $env:ProgramFiles\System Center 2012\Operations Manager\Reporting\Tools\OpsMgrTraceTMFVer.Dll”

        get-fileversion “Reporting” $env:ProgramFiles\System Center 2012\Operations Manager\Reporting\Tools\TraceFmtSM.exe”

        get-fileversion “Reporting” $env:ProgramFiles\System Center 2012\Operations Manager\Reporting\Tools\TraceLogSM.exe”

        #Files for SCOM 2012 Agent

        get-fileversion “Agent” $env:ProgramFiles\System Center Operations Manager\Agent\Microsoft.EnterpriseManagement.Modules.PowerShell.dll”

        get-fileversion “Agent” $env:ProgramFiles\System Center Operations Manager\Agent\MomIISModules.dll”

        get-fileversion “Agent” $env:ProgramFiles\System Center Operations Manager\Agent\MOMScriptAPI.dll”

        get-fileversion “Agent” ${env:ProgramFiles(x86)}\System Center Operations Manager\Agent\Microsoft.EnterpriseManagement.Modules.PowerShell.dll”

        get-fileversion “Agent” ${env:ProgramFiles(x86)}\System Center Operations Manager\Agent\MomIISModules.dll”

        get-fileversion “Agent” ${env:ProgramFiles(x86)}System Center Operations Manager\Agent\MOMScriptAPI.dll”

        }

}

#Run the get-remotefileversions function for all Management Servers

Foreach($ManagementServer in $ManagementServers)

{

    get-remotefileversions $managementserver.NetworkName

}

#Run the get-remotefileversions function for all agents

Foreach($Agent in $Agents)

{

    get-remotefileversions $agent.NetworkName

}

 

Tags: , , , , , , , , , , , , , , , , , , , ,

SCOM2012 – Quick test lab setup OpsMgr 2012 SP1 Beta using prepared VHD

Since I’m currently working with System Center Operations Manager 2012 (also often referred to as SCOM 2012 or OpsMgr 2012), I needed a testing environment.

Because time is precious, I want to minimize the time and effort needed to set it up. This is what I did:

  1. Install and configure Hyper-V on my Windows 8 laptop.
  2. Deploy a VM with Server 2012 Datacenter edition.
    Configure a static IP address.
    Configure AD DS / domain controller role.
    Configure DHCP server role.
    Configure DNS server role (if desirable, include DNS forwarder for internet DNS queries).
  3. Download and extract the pre-configured SCOM 2012 SP1 beta VHD (running Server 2012 Datacenter edition). System Center 2012 SP1 adds Windows Server 2012  SQL Server 2012 Support.
  4. Create a new VM for SCOM and configure it to use the downloaded pre-configured VHD.
    Configure it with sufficient virtual CPUs and memory  for the DB and the SCOM components.
  5. Start the SCOM VM, and follow the onscreen instructions. NOTE: First time configuration took about 1-2 hours, but this might be related to my hardware. Still it might be smart to plan the installation.
  6. Convert the Server 2012 Datacenter edition from ServerDatacenterEval to ServerDatacenter by running an elevated CMD as administrator and issuing the following command:
    DISM /online /Set-Edition:ServerDatacenter> ProductKey:<productkey> /AcceptEula
    Reboot.
  7. Replace the SCOM 2012 evaluation license with your own license using Operations Manager Shell:
    Set-SCOMLicense -ProductId “yourlicensekey“
    Reboot
    Check the license using the Operations Manager Shell:
    Get-SCOMManagementGroup | ft skuforlicense, version, timeofexpiration –a
  8. Shut down your SCOM 2012 VM.
  9. Shut down your AD DS / domain controller VM.
  10. Create a snapshot and/or export of both VM’s so you can more easily revert to a good starting point.

Also be sure to read Stefan Stranger’s blog post that goes into more detail with regards to the domain controller and automating the task for setting it up. It also includes screenshots to give you a better idea of the process.

PS: I love how Microsoft provides these pre-configured VHD’s. This has been great in the past, but now with client Hyper-V 3.0 in Windows 8 it saves me even more time because I don’t have to boot to Windows Server 2008 or Windows Server 2012 for Hyper-V.

 

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , ,

VMware – Free e-learning courses and free tool (vCenter Operations Manager Foundation) available

In the last week, a couple of cool VMware related things have been made available for free:

  1. vCenter Operations Manager Foundation is the entry-level edition of the vCenter Operations
    Management Suite that will help you manage the health and performance of your vSphere environment. It is now included for free with all vSphere editions. For more information about the complete suite, read the VMware vCenter Operations Management Suite Edition Comparison. Eric Sloof from NTPRO.NL also created a video showing of this tool.
  2. E-learning vSphere Data Protection and Recovery Fundamentals
  3. E-learning VMware vCloud Director Fundamentals

I didn’t have time yet to check these out myself. If you’re already using this tool or have already completed a course, please let me know if you liked it.

To keep track of free e-learning courses, bookmark mylearn.vmware.com.

 

Tags: , , , , , , , , , , , , , , , , ,

Windows 8 – Tweakers.net AppRace 2012 kick-off event December 6th at 18:30 CET with live stream

Tweakers is hosting the AppRace 2012 together with Microsoft. If you have the skills and time to build it, be sure to sign up for the AppRace. The best 5 apps are being rewarded with a Windows 8 RT device and the winner also gets a ticket for TechDays.

Today (December 6th) the kick-off will be at 18:30 CET. There will also be a live stream available if you’re curious about the event.

 

Tags: , , , , , , , , , , , , , , , , , ,

Windows 8 – Beware of the differences between shut down (fast startup) and restart

As some of you might know Windows 8 has a new feature called Windows 8 fast startup. As the name implies, this allows for a faster startup.

Basically when you use shutdown in Windows 8, the system is never completely shutdown. It basically closes the user sessions and hibernates the kernel session (instead of closing it as with Windows 7). When you us restart in Windows 8, the kernel session will be closed.

It is important to realize this, because some changes to your systems might require a reboot to become active. Even though in the past it was also ok to shut down the system and then start the system again, with Windows 8 you really need to perform a restart.

To manage the Fast Startup feature, check this blog post. Here’s another great blog post that discusses the Fast Startup feature in more detail and also covers Fast Startup in relation to shutdown.exe and PowerShell.

 
Leave a comment

Posted by on December 5, 2012 in ICT, Microsoft, Windows, Windows 8

 

Tags: , , , , , , , , ,

Windows 8 – Tips to improve Windows 8 productivity with the new GUI

I’ve been using Windows 8 for quite some time now (10 months or so), but at first I also had trouble getting used to the new GUI. When I talk to people about Windows 8, there seem to be a lot of people that are having these troubles as well.

For those people, please read this great article before deciding to move back to an older version of Windows:
http://www.hanselman.com/blog/Windows8ProductivityWhoMovedMyCheeseOhThereItIs.aspx

 
1 Comment

Posted by on December 5, 2012 in ICT, Microsoft, Windows, Windows 8

 

Tags: , , , , , , , , ,

Windows 8 – 5 deployment and systems management session videos

Great videos of Windows 8 deployment and system management sessions can be found here.

Sessions:

  • Creating Custom WinPE 4.0 boot images
  • A Geeks guide to the Galaxy – Building a SC 2012 Configuration Manager OS Deployment Solution
  • Inside Windows 8 – The new Assessment and Deployment Kit, ADK
  • Inside Windows 8 – Mastering the Setup Engine
  • SC 2012 Configuration Manager OSD – Tips & Tricks from the Deployment Masters

These sessions were recorded at the NIC 2012 (Nordic Infrastructure Conference). Be sure to check the website for more videos and interesting information.

 

Tags: , , , , , , , , , , , , , , , , , ,

Altaro offers 50 Free Home PC Backup Licenses until December 24th

Altaro is offering 50 Free PC Backup Licenses for ALL Hyper-V admins to use or give away to friends/family. You only have to send a screenshot of your Hyper-V manager together with your name and E-mail.

I have no experience with Altaro Home PC Backup, but since it is free, why not take advantage of ths offer and test it.

 
Leave a comment

Posted by on December 2, 2012 in Applications, Backup, ICT, Windows, Windows 8

 

Tags: , , , , , , , , , , , , ,

Windows 8 – Apps in Windows store hacked, what will Microsoft do ?

In the last week several newssites reported that apps in the Windows store had been hacked. First there was a hack to convert a trial app to a fully functional app using WSAConeKey. Then there was also a “hack” to remove ads from apps.

I wonder if, how and when Microsoft will patch these vulnerabilities. If they don’t do something quickly, I think it could severely limit the number of apps being developed for Windows 8. And although the number of apps in the Windows Store is increasing pretty quickly, there’s still some catching up to do.

On the plus side however, Microsoft has sold 40 million Windows 8 licenses in a month 🙂

I’ve personally been using Windows 8 for quite some time now and really like it. It did take some time getting used to, but Hyper-V makes my life so much easier. For me the Modern (Metro) interface and Windows 8 apps are a nice extra, but to be honest I don’t use them that often. Maybe that will change when more good apps will be released.

[UPDATE 12-12-2012]
App developers have always been able to secure their apps better as mentioned here.
[UPDATE 12-12-2012]

 
Leave a comment

Posted by on November 27, 2012 in ICT, Microsoft, Windows, Windows 8

 

Tags: , , , , , , , ,

Technet library personalizations to make your life easier

Since I often participate in Microsoft beta exams and books are not available at that time, I spend a lot of my time using Technet. Here are some personalizations I use:

Technet library view type:

For people who’ve been using the Technet library for many years, they are probably familiar with the “Classic” interface shown below:

Until a couple of weeks ago, I thought this interface had simply been replaced by a new “lightweight” interface. You can however change the view using the settings button  to match your preference.

Technet library Print/Export multiple topics

Sometimes you want to easily bookmark topics for later (offline) use and possibly even on other devices. The Print Multiple Topics feature provides this functionality. Be sure to try it:
http://technet.microsoft.com/en-us/library/export/help(lightweight)

Some more information about this feature can be found here.

 
Leave a comment

Posted by on November 26, 2012 in ICT, Internet, Learning, Microsoft, Tutorials

 

Tags: , , , ,