Roger Zander at myITforum.com

RuckZuck, a Software Package Manager for Windows

RuckZuck is a new Software Package Manager for Windows with a simple graphical User-Interface.

RZInstall

RuckZuck has it’s own Repository but it does not store binaries of the Software, just the links to where the software can be downloaded.
It detects installed Software based on entries an “Add-Remove Programs” and provides Updates if newer version exists in the repository.

Users can create new Software-Entries for their favorite tools ( How to create and upload new Software ), so the Repository can grow in the future…

This is the first release of the tool, discussions and features can be placed on ruckzuck.codeplex.com.

Prerequisites to run the tool:
- Microsoft .NET Framework 4.5
- Powershell 4


Posted: Dec 15 2014, 03:18 PM by rzander | with no comments
Filed under:
How to use Collection Variables outside of Task-Sequences

Out of the box, Collection and Device Variables are only usable from within Task-Sequences. To get the Variables outside of Task-Sequences, you can install an additional WMI Provider (https://gallery.technet.microsoft.com/ConfigMgr-Collection-1650d5bc) that provides the Variables and Values in a separate WMI Class (root\ccm\clientsdk:EXT_CollectionVariables )

Example to get all Variables assigned to the local device:

Get-WMIObject -Namespace 'root\ccm\clientsdk' -Class 'EXT_CollectionVariables'

Example to get the value of a specific Variable

(Get-WMIObject -Namespace 'root\ccm\clientsdk' -Class 'EXT_CollectionVariables' -Filter "Name='Country'").Value

By using the WMI Provider, you can now use ConfigMgr Variables in PowerShell installation Scripts…


Note: The WMI Provider is as is without support or warranty; .NET Framework 4.5 is a prerequisite

Posted: Nov 06 2014, 06:02 PM by rzander | with no comments
Filed under: , , ,
FREE Inventory Solution

Initially it was planned to create a Solution to store status Information from SmartHome Devices… But during testing, I always used data from my PC and realized that inventory a PC isn’t a big challenge… The solution is published as “Thingtory” (no, there is no political background !) on Codeplex (https://thingtory.codeplex.com/).

A few Key-Features:

A DEMO Environment is published on http://thingtory.azurewebsites.net/. You have to register to get an Access-Key. The Key is required to protect your data so other users will not see your data.

A simple Reporting allows to browse the inventory database and export data as XML Dataset (can be imported in Excel)

image

Note: this is just a case study… but you are free to extend it based on your wishes….

Collection Query findings

Collection Queries can be created easily from the Configuration Manager Console without deep knowledge of WQL or SQL… But have you ever checked how long the Collection Evaluator requires to execute the Query ?

An example: the following Rule should get all Machines with a specific Software installed where the Software itself can be x86 or x64:

image

CollEval took 153s ( 2min 33s ) to evaluate the rule ( in an environment with ~15’000 Devices ).

The Problem with this Rule is that two big tables with a lot of records per device are joined.

In this case it would make sense to create two individual queries on the Collection, one for x86 and one for x64.  A Query that references only one of the two big tables takes about 2s in this environment. So for two queries you will end up in ~4s.

Another Option would be to use “Installed Software” instead of “Installed Applications” because “Installed Software” contains x86 and x64 Software in one Table:

image

this Rule took only 2s

“Installed Software” is not enabled by default, you have to enable this inventory class in the AssetIntelligence section.
If you want to have a single Query Rule for x86 and x64 “Installed Applications” then you can use  a sub-select statement:

image


select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,
SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,
SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.ResourceId in
(select  SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceId FROM SMS_G_System_ADD_REMOVE_PROGRAMS where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "SoftwareA") or SMS_R_System.ResourceId in (select  SMS_G_System_ADD_REMOVE_PROGRAMS_64.ResourceId FROM SMS_G_System_ADD_REMOVE_PROGRAMS_64 where SMS_G_System_ADD_REMOVE_PROGRAMS_64.DisplayName = "SoftwareA")

This Query took also 2s

Conclusion:
There are many ways to get the Result, but the time that CollEval requires to execute a Query can vary (in the scenario here from 153s to 2s ).

Posted: Aug 27 2014, 02:49 PM by rzander | with no comments
Filed under:
Unattended ConfigMgr2012 Setup

How much effort do you need to setup a System Center Configuration Manager 2012 R2 Site…

It’s just one Command !!!

If you have Windows Management Framework 5.0, just enter “install-package cm12r2” or with chocolateycinst cm12r2

Prerequisites:
- Server 2012 R2 (Domain joined)
- .Net Framework 3.5.1 installed !!!
- Fast internet connection (it will download ~4GB of data)
- 3 hours (dependent of the internet connection)
- more than 10GB free Disk space on drive C:

What does it do:

The Package cm12r2 will install the following dependencies:
- cm12r2.iis (Installation and configuration of IIS and other required Windows Features )
- cm12r2.adk (download and installation of ADK8.1 with the features required for Cm12)
- cm12r2.sql2012 (download and install SQL Server 2012 SP2 EVAL)
- cm12r2.cm (download and installation of System Center Configuration Manager 2012 R2 EVAL)

At the end you should have a fully functional ConfigMgr2012 Site.

Note: All the sources are downloaded directly from Microsoft. The setup is for evaluation only, do not use this in a productive environment !!

Posted: Jul 04 2014, 11:27 AM by rzander | with no comments
Filed under: ,
MSI UpgradeCode as Detection Method in CM12

Configuration Manager 2012 has a built-in Wizard to use the MSI Product Code in the Detection Method but there is no option to check for the Upgrade Code of a Windows Installer Package. 

The Product Code is a GUID that “normally” changes with different versions or languages where the Upgrade Code identifies a Product across Languages and Versions. So it may be helpful (sometimes) to use the Upgrade Code in a Detection Method if it doesn’t matter what version or language is installed.

Product Code:  http://msdn.microsoft.com/en-us/library/aa370854(v=vs.85).aspx
Upgrade Code: http://msdn.microsoft.com/en-us/library/aa372375(v=vs.85).aspx

The Installed Upgrade Codes (x86 and x64) are stored in the Registry:

HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\
UpgradeCodes

But to make it more challenging, the Upgrade Codes are "scrambled" (no idea why !?), so you cannot just search for a key...

To "Scramble" your Code, just take the first 8 Characters and read it from right to left (reverse), then the same with the next 4 Characters , then again with 4 characters and for the rest always take 2 characters and reverse the content:

image

With PowerShell you can use the following example to get the "scrambled" key:

$UpgradeCode = '{35265AC6-8855-4970-9275-C1E3EDDB46F1}'

$code = @( 8, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2 )
$string = $UpgradeCode -creplace '[^0-F]'
$pos = 0
$result = '' 

#Decode
for($i=0; $i -le $code.Length ; $i++)
{ $arr = $string.substring($pos, $code[$i]) -split "";
[array]::Reverse($arr);
$result = $result +($arr -join '').replace(' ','');
$pos = $pos + $code[$i] }

$result

You can then use the resulting key to create a detection rule to measure if the key exists or you can use a custom script in the detection method to check if the Upgrade Code exists:

$UpgradeCode = '{35265AC6-8855-4970-9275-C1E3EDDB46F1}'

$code = @( 8, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2 )
$string = $UpgradeCode -creplace '[^0-F]'

#Decode
for($i=0; $i -le $code.Length ; $i++)
{ $arr = $string.substring($pos, $code[$i]) -split "";
[array]::Reverse($arr);
$result = $result +($arr -join '').replace(' ','');
$pos = $pos + $code[$i] }

#Test if key exists
if(Test-Path `
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\
UpgradeCodes\$result)
{ $true } else { $null }

Posted: Jun 24 2014, 04:02 PM by rzander | with no comments
Filed under: ,
Chocolatey Applications in Configuration Manager 2012

Do you want to pimp your Configuration Manager Application Catalog in your Demo or Lab Environment with some (~200) nice looking Applications…

image

… then download and import the ChocoApp application Archive and import it into Configuration Manager 2012.

The Applications are imported from the chocolatey.org Package-Repository. They use the Chocolatey command to download and install the applications. The Apps do not have any content because chocolatey will load the content directly over the Internet.


To make the Applications available in the Application Catalog, you have to create a deployment for these “ChocoApps”… This can be done by PowerShell or you can use “ChocoDeploy” to create a deployment to the “All Users and user Groups” Collection.

Just copy ChocoDeploy.exe and ChocoDeploy.exe.config to the “Microsoft Configuration Manager\AdminConsole\Bin” directory on the Site Server und start it from there.


Note: There is no warranty or Support, use at your own risk.

Posted: May 28 2014, 11:14 AM by rzander | with no comments
Filed under: ,
PowerShell scripts in Collection Commander

With the release of Collection Commander V1.0.0.6, PowerShell commands are now all stored as files in the “PSScripts” Directory next to the executable….
image

The PS1 Files can be moved into subfolders to have an organized structure of the files…

image

The PowerShell Command Console will load all the Files and Folders and generates a menu structure that is identical to the folder structure…

image

The latest version contains already a set of PowerShell examples but if you have some scripts to share, send me a note ore post the PS code on cmcollctr.codeplex.com.

Posted: Jan 31 2014, 03:52 PM by rzander | with no comments
Filed under: , ,
Monitor Inventory WMI Provider updated

The Project moved from Sourceforge to https://monitordetails.codeplex.com/.

The new version of the WMI Provider does now also report the

- diagonal Size (in inch)
- horizontal size (in cm)
- vertical size (in cm)

You can extend Configuration Manager 2012 Hardware Inventory to collect the WMI Class "Win32_MonitorDetails" ....

Posted: Jan 09 2014, 09:31 AM by rzander | with no comments
Filed under: , ,
Client Center for Configuration Manager stable release

Client Center for Configuration Manager is now available as stable release (version 1.0.0).

A Windows Installer setup is available for x64 and x86. There is also a browser based version that can be hosted on an internal IIS server.

Or you can use the Click-Once edition which will automatically updates to the latest version.

Note: .NET 4 and WinRM are required to use the tool.

Posted: Dec 23 2013, 12:33 PM by rzander | with no comments
Filed under: , ,
PowerShell to cleanup expired "Client Operations" tasks

Deleting old, unused Client Operations tasks in the Configuration Manager 2012 Console is a pain because you cannot delete multiple items; you have to delete one by one....

The following PowerShell Command will cleanup all expired "Client Operations" Tasks (Adminconsole node Monitoring\Client Operations).
Replace xxx with your SiteCode and run the command on the site server.

Get-WmiObject -namespace "root\sms\site_xxx" SMS_ClientOperationStatus -Filter IsExpired=1 | % { ([wmiclass]"root\sms\site_xxx:sms_ClientOperation").DeleteClientOperation($_.ID )  }

Posted: Nov 26 2013, 12:59 PM by rzander | with no comments
Filed under: ,
Stable release for Collection Commander

Collection Commander for Configuration Manager 2012 has now a stable Version (Build V1.0.0.3) which is available as WindowsInstaller (MSI) package.

Change log:
- MSI Setup
- UI Improved
- CM12 Console integration
- New Powershell code snippets
- Client Center Integration

If you miss some functions, please place a note on https://cmcollctr.codeplex.com/discussions (with the corresponding Powershell command if available).

Posted: Oct 15 2013, 07:54 PM by rzander | with no comments
Filed under: , , ,
Configure WinRM by using CM12 Settings Management

Configuring WinRM (Windows Remote management) over GPO is a common scenario, but what to do if your Systems are not member of a Domain ?….
Compliance Settings in Configuration Manager 2012 can monitor and remediate configurations; why not using this technology to track the WinRM settings on your systems.

I’ve prepared a Baseline that monitors and remediate some basic WinRM settings:
image

You can download the Baseline example here: WinRM Configuration.zip

Posted: Jun 21 2013, 03:41 PM by rzander | with no comments
Filed under:
Monitoring CM12 Prerequisites and IIS configurations

Is IIS on your CM12 Site Systems properly configured ? An easy way to monitor (and automatically fix) your settings is using the compliance settings management from Configuration Manager 2012…

Based on Prerequisites for Site System Roles , I’ve created a DCM Baseline example that monitors and fixes IIS configurations and missing Server features that are used on ConfigMgr2012 Site System Roles …

Configuration Matrix:

IIS_DCM

Note: This is just an example… do not enable auto remediation if you are not 100% sure what the CI’s are doing… !  Use at your own risk.

Download the DCM Baseline here: IIS Configuration for CM12.zip

Posted: May 13 2013, 01:35 PM by rzander | with no comments
Filed under:
Collection Commander for Configuration Manager 2012

A first beta of Collection Commander for Configuration Manager 2012 is now published on http://cmcollctr.codeplex.com. Collection Commander for CM12 is an extended version of the recently released Patch Monitoring Tool for CM12.

It does use the SCCM Client Center Automation Library (which requires WinRM) as core, but can also  run custom powershell commands against multiple systems. If you are missing some commands, please report your wishes on the project page.

Screenshot

Installing the CM12 Console Extension (right click option):
- run "CMCollCtr.exe /Install" to install the right click option

Usage:
- right click a Collection in CM12 and select "Collection Commander...", or copy and paste computernames on the tool.
- the tool will automatically ping all systems and check for pending reboot etc.
- select one or multiple rows and right click to get the option to "Run powershell code..."
- select a Powershell command from the template list or write your own command
- ... the Powershell result will be retunred to the "StatusMessage" column.


Have fun


Posted: Apr 29 2013, 04:15 PM by rzander | with no comments
Filed under: , , ,
More Posts Next page »