Getting Product Pack version number from 1E Tachyon version 3.0

This is just a quick post of a Powershell script that might be useful when trying to compare what versions of Tachyon Product Packs are installed in your Tachyon environment to those that are on the TachyonExchange.

$Cred = Get-Credential
$url = “https://tachyondemo.1e.local/consumer/ProductPacks/
$headers = @{}
$headers.Add(“X-Tachyon-Consumer”,”Explorer”)
$object = Invoke-RestMethod -Uri $url -Credential $Cred -Headers $headers
$object | FT Name, Version, UploadTimestampUt, Description

This should give you output similar mine development environment.

ScriptOutput

Leave a comment

Parsing the Tachyon Switch log for SSL failures

The script below will give you a count of the IP addresses that have attempt to connect to the Tachyon Switch but have been refused because of an SSL connection error.

 

#Update this with the path to Tachyon.Switch.log
$File = ‘C:\Temp\New folder\Tachyon.Switch.log’

$Output = @()
$hash =@{}

#this is the text in the log that indicate the agent is unable to connect.
$Warnings = Select-String $File -pattern “Warning: state=2”
foreach ($Line in $Warnings)
{
$newline = $line.ToString().Split(“=”)
$Output = $Output + $newline[2]
}

#Add a count to the list
$Output| % {$hash[$_] = $hash[$_] + 1 }

#only include IPs with more than 1 occurrence
$Result = $hash.getenumerator() | ? { $_.value -gt 1 }

#Order the list in occurrence order.
$Result | Sort-Object Value -Descending

Example output:
Name           Value
—-                 —–
10.0.1.136    2
10.1.9.238    2

Leave a comment

Get ConfigMgr Versions

Just a quick blog to share a little SQL query that shows what version of ConfigMgr is being used at each site in you hierarchy.

SELECT DISTINCT SiteServer,’Site Version Number’ = Version,’Version Name’=
CASE
WHEN Version = ‘4.00.5135.0000’ THEN ‘ConfigMgr 2007 Beta 1’
WHEN Version = ‘4.00.5931.0000’ THEN ‘ConfigMgr 2007 RTM’
WHEN Version = ‘4.00.6221.1000’ THEN ‘ConfigMgr 2007 SP1’
WHEN Version = ‘4.00.6221.1193’ THEN ‘ConfigMgr 2007 SP1 with KB977203’
WHEN Version = ‘4.00.6487.2000’ THEN ‘ConfigMgr 2007 SP2’
WHEN Version = ‘4.00.6487.2111’ THEN ‘ConfigMgr 2007 SP2 with KB977203’
WHEN Version = ‘4.00.6487.2157’ THEN ‘ConfigMgr 2007 R3’
WHEN Version = ‘4.00.6487.2207’ THEN ‘ConfigMgr 2007 R3 with KB2750782’
WHEN Version = ‘5.00.7561.0000’ THEN ‘ConfigMgr 2012 Beta 2’
WHEN Version = ‘5.00.7678.0000’ THEN ‘ConfigMgr 2012 RC1’
WHEN Version = ‘5.00.7703.0000’ THEN ‘ConfigMgr 2012 RC2’
WHEN Version = ‘5.00.7711.0000’ THEN ‘ConfigMgr 2012 RTM’
WHEN Version = ‘5.00.7711.0200’ THEN ‘ConfigMgr 2012 RTM CU1’
WHEN Version = ‘5.00.7711.0301’ THEN ‘ConfigMgr 2012 RTM CU2’
WHEN Version = ‘5.00.7782.1000’ THEN ‘ConfigMgr 2012 SP1 Beta’
WHEN Version = ‘5.00.7804.1000’ THEN ‘ConfigMgr 2012 SP1’
WHEN Version = ‘5.00.7804.1202’ THEN ‘ConfigMgr 2012 SP1 CU1’
WHEN Version = ‘5.00.7804.1300’ THEN ‘ConfigMgr 2012 SP1 CU2’
WHEN Version = ‘5.00.7804.1400’ THEN ‘ConfigMgr 2012 SP1 CU3’
WHEN Version = ‘5.00.7804.1500’ THEN ‘ConfigMgr 2012 SP1 CU4’
WHEN Version = ‘5.00.7804.1600’ THEN ‘ConfigMgr 2012 SP1 CU5’
WHEN Version = ‘5.00.7958.1000’ THEN ‘ConfigMgr 2012 R2’
WHEN Version = ‘5.00.7958.1101’ THEN ‘ConfigMgr 2012 R2’
WHEN Version = ‘5.00.7958.1203’ THEN ‘ConfigMgr 2012 R2 CU1’
WHEN Version = ‘5.00.7958.1303’ THEN ‘ConfigMgr 2012 R2 CU2’
WHEN Version = ‘5.00.7958.1401’ THEN ‘ConfigMgr 2012 R2 CU3’
WHEN Version = ‘5.00.7958.1501’ THEN ‘ConfigMgr 2012 R2 CU4’
ELSE ‘Unknown version’
End
FROM Sites

The version information came from http://en.wikipedia.org/wiki/System_Center_Configuration_Manager

, , , ,

Leave a comment

Registering existing Nomad Cache in ActiveEfficiency Single Site Download (SSD)

This is a continuation of the conversation I have with a customer that was started in my previous blog ‘How to enable the Nomad Single Site Download (SSD) feature after deployment of Nomad

Customer question: ‘As you know we have been using Nomad for months now and have a large amount of content cached on clients, is it possible to tell Nomad to populate ActiveEfficiency?’
Answer: ‘Sorry there is no Supported way to do this.’

Customer: ‘OK, but is it possible?’
Answer: ‘Yes, if you follow this process but remember this will not be supported by 1E’

As this process is not supported by 1E the following disclaimer applies

DISCLAIMER

Use of these items and process is at your sole risk.
All items and information are provided “as-is”, without any warranty, whether express or implied, of accuracy, completeness, fitness for a particular purpose, title or non-infringement. In no event shall 1E, its suppliers or author of this blog be liable for any damages whatsoever including direct, indirect, special, incidental or consequential, loss of business profits or special damages, even if 1E, its suppliers or author of this blog have been advised of the possibility of such damages.

I highly advise that you complete this process in a lab environment and fully understand the process before attempting the steps in production. Remember this is an unsupported process.

Step one – Stop Nomad Branch service to prevent the Nomad service responding to subnet election requests.
Example Powershell code: Stop-Service NomadBranch

Step two – Delete the Nomad Branch cache package status reference from the registry, this will force Nomad to enter Recovery mode when it next starts up.
Example Powershell code: Remove-Item -Path HKLM:\Software\1E\NomadBranch\PkgStatus -Recurse

Step three – Start Nomad Branch service, in the NomadBranch.log you should see

1
and the registry will show.

2
Example Powershell code:
Start-Service NomadBranch

Step four – Finally, to finish the reactivation process execute NomadBranch.exe -ActivateAll. This will complete the activation process.

3
and the registry will show.

4
Example Powershell code:
NomadBranch.exe -ActivateAll

Note: Using this process to populate the ActiveEfficiency database may affect some of the 1E Nomad reports.

Below is an example Powershell script that can enable SSD and register the content of the Nomad Cache with ActiveEfficiency

Final warning remember this is an unsupported process

#<DNS Alias for ActiveEfficiency Server>
$AEServerDNSAlias = ‘ActiveEfficiency’

# 0 is disabled, 1 is enabled to read from AE, 2 is enabled to write to AE 3 is enabled for both read and write.
$SSDEnabled = ‘3’

#Change to HK:M:\Software\WOW6432Node\1E\NomadBranch if 32 bit Nomad agent is used on 64 bit OS with CM2007 client
$RegPath = ‘HKLM:\Software\1E\NomadBranch’

#Stop Nomas service so that it does not respond to elections
Stop-Service NomadBranch

#Enable SSD
Set-ItemProperty -Path $RegPath -Name SSDEnabled -Value $SSDEnabled -Force

#Set ActiveEfficiency URL
Set-ItemProperty -Path $RegPath\ActiveEfficiency -Name PlatformURL -Value http://$AEServerDNSAlias/ActiveEfficiency -Force

#Delete all Package Status register key
Remove-Item -Path $RegPath\PkgStatus -Recurse

#Restart Nomad to allow Nomad to register into 1E ActiveEfficiency
Start-Service NomadBranch

#Finally reactivate the Nomad cache so that it shows as 100% complete rather that 99.00%
NomadBranch.exe -ActivateAll

, , , ,

Leave a comment

How to enable the Nomad Single Site Download (SSD) feature after deployment of Nomad.

I was recently asked by a customer how to enable the Nomad Single Site Download (SSD) feature, they had been using Nomad for some time but had never implemented ActiveEfficiency.

Step one – Install ActiveEfficiency server by following the ActiveEfficiency installation guide that ships with the ActiveEfficiency or 1E ActiveEfficiency online help.
Note: It is good practice to create a DNS alias for the ActiveEfficiency server.

Step two – Create the SSD location map using the sample PostADSiteandSubnet.ps1 Powershell script shipped with Nomad. This will query Active Directory Sites and Services and populate the Location table (if the information in AD Sites and Services does not represent your geographical locations then a custom script should be used).

Step three – Enable SSD on all Nomad agent

Change the HKLM\Software\1E\NomadBranch SSDEnabled to 3, this allow the SSD feature to both publish and consume information from ActiveEfficiency.

Change HKLM\Software\1E\NomadBranch\ActiveEfficiency PlatformURL to http:// /ActiveEfficiency

Example Powershell code to set both of these values:

Set-ItemProperty -Path HKLM:\Software\1E\NomadBranch -Name SSDEnabled -Value 3 –Force

Set-ItemProperty -Path HKLM:\Software\1E\NomadBranch\ActiveEfficiency  -Name PlatformURL -Value http:// /ActiveEfficiency –Force

Not much to it, the next package that is downloaded via Nomad will register in the ActiveEfficiency database and will be available for all clients on associated subnets.

Note: Nomad will always hold a local subnet election before using the SSD feature.

In my next blog I’ll look at populating ActiveEfficiency with SSD information for software already in the Nomad Cache.

1 Comment

Comparing Trace32/CMTrace and CMLogViewer from System Center Support Center

As a long time ConfigMgr admin and now 1E Consultant I have been using Trace32 and CMTrace for longer than I care to remember. Both tools have made reading ConfigMgr log file so much easier (sorry Wally, I know you are a Notepad fan) and most of my scripts will format their log file output in the same format so that if I need to I can merge the logs.

Even though these log viewer are great they have a few limitations:

  • you can only highlight on one string at a time
  • you can only filter on one string at a time
  • the default when setting the filter is ‘is equal to’ (lost count how many times I’ve had to go back a change this after applying)
  • No shortcut key to select either filter or highlight

Still even with these limitation both tools have been used by sysadmins the world over for many years.

In September Microsoft released System Center Support Center (which can be downloaded here) which include a new improved log file viewer called ‘Support Center Log Viewer’ the exe is CMLogViewer.exe. In my opinion this has addressed all of the limitation the previous viewers had, mainly by including a ribbon with all the option available at a click of a button.

Here are my favourite features:

  • Quick filter – simply start typing a word and after each key press the log view is refreshed
  • Open log in current view – open new log file and merge with current log file
  • Advanced filter – this allow for multiple include, excludes and highlights(with multiple colours).

Best of all the filters can be saved and loaded giving the ability to create and share filter files to help troubleshooting.

I highly recommend that you give the new log viewer a go.

, ,

Leave a comment

Renaming local accounts during Windows 7 build

I was recently helping a customer optimise their Window 7 Task Sequence and found a step called Rename Accounts that was taking 8 or 9 minutes to complete. This seemed to be excessive, on investigate the step was running a 25 line vbs script that would basically swap the Administrator account name with another account using WMI Query to find the account eg Select * from Win32_UserAccount where LocalAccount = True and Name = ‘Administrator’.

Running this query directly from WBEMTEST result in a wait of over 2 minutes as it appears queries the domain for all counts.

By simply changing the where statement to Where Domain = “<Computer Name>” and Name = “Administrator” the query runs in seconds.

This is an example of how this can be handle in the script.

Set wshShell = CreateObject(“WScript.Shell”)
Set objWMIService = GetObject(“winmgmts:\\” & strComputerName & “\root\cimv2”)

strcomputername = wshShell.ExpandEnvironmentStrings (“%COMPUTERNAME%”)

Set colAccount = objWMIService.ExecQuery (“select * from Win32_UserAccount where Domain = ‘” & strComputerName & “‘ and Name = ‘Administrator'”)
For Each objAccount in colAccount
     wscript.echo objAccount.name
Next

 

Alternatively it is possible to use the Wscript.Network object as shown below.

Set objNetwork = CreateObject(“Wscript.Network”)

strComputer = ucase (objNetwork.ComputerName)

Set objComputer = GetObject(“WinNT://” & strComputerName)

Set objUser = GetObject(“WinNT://” & strComputerName & “/<OldUserName>/User”)

objComputer.MoveHere objUser.ADsPath,”<NewUserName>”

Note: all values inside <  > should be replaced with the actual value and should not include the < > characters.

 

 

,

2 Comments