O R G A N I C / F E R T I L I Z E R: 10.10

Oct 27, 2010

sccm: custom data discovery records (DDRs) using powershell

for anyone who has been creating custom DDRs, this is old hat.  for me, I just wanted to prove that it could be done in powershell.  apparently no one has tried -- or at least web searching has led me to believe it.  :)

$Computer = "MarcusRocks"
$IPAddress = "",""
$MACAddress = "00:02:A5:B1:11:68","00:02:A5:B1:11:69"

$SMSDisc = New-Object -ComObject SMSResGen.SMSResGen.1

$SMSDisc.DDRAddString("Netbios Name", $Computer, 64, 0x8)
$SMSDisc.DDRAddStringArray("IP Addresses", $IPAddress, 64, 0x10)
$SMSDisc.DDRAddStringArray("MAC Addresses", $MACAddress, 64, 0x10)

$SMSDisc.DDRWrite([System.Environment]::GetFolderPath("Desktop") + "\$Computer.DDR")


in sccm 2007, the command to send the DDR to the site server was removed in the sccm sdk redistributable dlls.  this isn't a tragedy.  it simply means you have to copy the DDR to the <site server>\sms_xyz\inboxes\ddm.box folder yourself.  I didn't include that bit in the script since this is just for fun.  anyway, once the DDR is processed, this is what you would see:



go discover the world -- or at least your macs and linux machines?  :)  and you know what I'm thinking?  yeah, that's right.  get this into opalis.  that'll be my next post.


other useful information I learned

$SMSDisc = New-Object -ComObject SMSResGen.SMSResGen.1

to start off on this adventure, I began navigating the sample script provided for creating a DDR [1].  the first thing I did was try to execute the command above.  it just spit out this stuff:
New-Object : Cannot load COM type SMSResGen.SMSResGen.1.
At line:1 char:22
+ $smsdisc = New-Object <<<< -ComObject SMSResGen.SMSResGen.1
+ CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException
+ FullyQualifiedErrorId : CannotLoadComObjectType,Microsoft.PowerShell.Commands.NewObjectCommand

it took me longer than I will ever admit that I did not have the necessary sccm sdk.  after installing it, I tried again and got the same result.  it took me longer than the part I will never admit that I had to register the dll.  so to reiterate -- download the sdk, then register the dll.  after installing the sdk, register smsrsgenctl.dll.  it's in this path: <Program Files>\Microsoft System Center Configuration Manager 2007 SDK\Redistributables.

the second hurdle is how do you know which com object to use during the creation of the new object?  well, other than the fact that they spell it out for you in the sample script --

Set newDDR=CreateObject("SMSResGen.SMSResGen.1")

-- there really is nothing that stands out.  powershell provides some conventions on getting this stuff out, but in actuality, it's nothing more than sifting through the registered classes in the registry.  I found something on from tobias weltner [2] that made this way easy.  it's a real gem you may want to hang on to:

gci registry::hkey_classes_root\clsid -include progid -recurse | % { $_.getvalue("") } | ? { $_ -like "*SMS*" }

executing this command brings back a set of results like the following...


and there we find the com object we were looking for.  now honestly, I'd have been goofing around for awhile trying to figure out which in the list matched.  it was helpful though for knowing that I had the dll registered properly!

moving on, now that you have the object, you can bring out the methods.

TypeName: System.__ComObject#{ecb65d0e-b16b-4817-92b0-bf2d9cefb3ac}

Name MemberType Definition
---- ---------- ----------
DDRAddInteger Method void DDRAddInteger (string, int, DDRPropertyFlagsEnum)
DDRAddIntegerArray Method void DDRAddIntegerArray (string, Variant, DDRPropertyFlagsEnum)
DDRAddString Method void DDRAddString (string, string, int, DDRPropertyFlagsEnum)
DDRAddStringArray Method void DDRAddStringArray (string, Variant, int, DDRPropertyFlagsEnum)
DDRNew Method void DDRNew (string, string, string)
DDRSendToSMS Method void DDRSendToSMS ()
DDRWrite Method void DDRWrite (string)


as you can see, you now have methods available that are described in the sdk!  awesome.



[1] http://msdn.microsoft.com/en-us/library/cc142988.aspx
[2] http://powershell.com/cs/blogs/ebook/archive/2009/03/08/chapter-6-using-objects.aspx

Oct 19, 2010

powershell: listing stuff from add/remove programs

heard from my buddy stefan stranger today and was discussing how to get information from ARP.  this is what we came up with:

my method

dir "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | % { get-itemproperty $_.pspath }


his method

get-itemproperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*


his method requires less typing but in actuality took longer -- usually about twice as long.  still too fast to notice the difference but interesting anyway.  must be the wildcard.

measure-command {dir "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | % { get-itemproperty $_.pspath }}

Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 736
Ticks : 7368684
TotalDays : 8.52856944444444E-06
TotalHours : 0.000204685666666667
TotalMinutes : 0.01228114
TotalSeconds : 0.7368684
TotalMilliseconds : 736.8684



measure-command {get-itemproperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*}

Days : 0
Hours : 0
Minutes : 0
Seconds : 2
Milliseconds : 876
Ticks : 28768438
TotalDays : 3.32968032407407E-05
TotalHours : 0.000799123277777778
TotalMinutes : 0.0479473966666667
TotalSeconds : 2.8768438
TotalMilliseconds : 2876.8438

Oct 16, 2010

atlanta systems management user group 10/11/2010

update: recordings are up.  click the titles to go to the recordings!

The Atlanta Southeast Management User Group and System Center Virtual User Group invites you to attend the next SMUG meeting scheduled for October 11th, 2010 for a day of great presentations, discussions, and networking.

Because this is a hybrid user group meeting there are two ways to register:

If you would like to attend IN PERSON at the Alpharetta Microsoft Campus please register here. https://www.clicktoattend.com/invitation.aspx?code=151055

If you would like to attend VIRTUALLY please register here. http://www.clicktoattend.com/?id=151148



October 11, 2010

10:00 AM – 4:00 PM Eastern Time Zone

Lunch provided by Veeam. http://www.veeam.com

“The nworks Management Pack provides continuous monitoring of the largest, most demanding virtual environments. It features a centrally managed, distributed architecture for horizontal "no limits" scalability and automatic failover and load balancing for high availability. Optimized, user-configurable data publication methods and use of consecutive sample monitors, optimized performance providers and other advanced features of System Center deliver maximum information with minimal overhead.”








Opening and Introductions

9:50 AM

10:00 AM

Aaron Nelson

Uncovering Performance Gremlins in SQL Server

10:05 AM

11:00 AM

Scott Moss

Top 10 SCOM Hotfixes

11:05 AM

11:30 AM

Marcus Oh

Orchestrating Maintenance Mode with Opalis

11:30 AM

12:00 PM

Brian Pavnick

Connecting the Dots with nWorks MP for VMware

12:15 PM

1:00 PM

Denzil Ramsey

SCVMM Self Service Portal / vNext

1:05 PM

2:00 PM

Brian Huneycutt

Top 10 SCCM Hotfixes

2:05 PM

2:30 PM

Ted Sendler

OpsMgr R2 – Common Issues and Troubleshooting

2:35 PM

3:00 PM

Wally Mead

SCCM v.Next

3:00 PM

3:55 PM




Aaron Nelson

Aaron Nelson is a Senior SQL Server Architect with over 10 years experience in architecture, business intelligence, development, and performance tuning of SQL Server.  He has experience managing enterprise-wide data needs in both transactional and data warehouse environments. Aaron holds certifications for MCITP: Business Intelligence Developer, Database Administrator, Database Developer; as well as MCTS: Windows Server Virtualization, Configuration (meaning Hyper-V).

Scott Moss

Scott has been working in the IT industry for more than 14 years. The majority of his time served in IT has been at various Telecommunications institutions, as well as a 3 year work release program in the Lottery industry. The past 5 years he has been focused on Systems Monitoring using MOM 2005 and Operations Manager 2007. Scott was also awarded the Microsoft's MVP Award 2010 for Operations Manager. For the past two years he has been vice president of the Atlanta Southeast Management User Group and President of the System Center Virtual User Group. He is also a SystemCenterCentral.com blogger and forums contributor.

Marcus Oh

Marcus is a Lead Systems Administrator for a large telecommunications provider, running directory services and management infrastructure for ~30,000 systems. He has been a MVP for the last six years in System Center specializing in Configuration Manager and Operations Manager. Marcus has written numerous articles for technology websites as well as his own blog. He co-authored Professional SMS 2003, MOM 2005, and WSUS.

Denzil Ramsey

Denny is a Datacenter Technology Specialist focused on Microsoft Datacenter Virtualization and Management solutions. Denny has been with Microsoft for 5 years in several roles including Networking Technology Specialist, Exchange Premier Field Engineer and Technical Account Manager working with customers like Home Depot and Coca-Cola. Before joining Microsoft, Denny spent 7 years a Cox Communications where he managed the Windows Core Infrastructure team supporting Exchange, Active Directory, Systems Management and Windows Server infrastructure.

Brian Pavnick

Brian Pavnick is a Solutions Architect at Veeam Software who specializes in integrating Microsoft System Center technologies with VMWare's VI. Prior to Veeam, he has worked over 10 years as a Sr. Systems Administrator acquiring skills in operating, implementing, and project managing Microsoft Server Infrastructure Technologies. Throughout his career, he has specialized in Systems Management for Microsoft Server technologies. This includes OS deployment, patch management, system profiling, system and application monitoring, data security, and disaster recovery. Brian is a Microsoft Certified IT Professional in Enterprise Administration.

Brian Huneycutt

Brian is currently a developer (more a jack-of-all-trades really) on the Configuration Manager Sustained Engineering team. He started as a Support Engineer handling consumer desktop support issues at Microsoft in 1999. After having his fill of "No, there is no double right click, just a double left click" and "I'm sorry sir, I cannot help you with your ISP's login password issue" he escaped transitioned to the SMS team, where he quickly learned the value of the SMS logs. Once firmly entrenched in the SMS world, he worked through all levels of support, ending up as an Escalation Engineer ("What do you want to debug today?") prior to moving to the product team. These days he still partners with CSS (current acronym for Support) on problem investigations, along with development work on hotfixes, service packs, and generally anything that needs either fixing or a very long email. Those fleeting moments of free time are split between family, tooling around town in a little Triumph Spitfire, or making sawdust in the garage / workshop.

Ted Sendler

Ted is a Support Escalation Engineer on the System Center Support Team at Microsoft. He is primarily focused on issues dealing with MOM 2005, Operations Manager 2007, Service Manager 2010, System Center Essentials 2007 and 2010 , and Opalis.

Wally Mead

Wally has been with Microsoft for 17+ years. He started in the training group and helped develop the training course for the original release of SMS 1.0. He has then been involved with all versions of SMS, and now Configuration Manager, from developing and delivering training, or assisting customers on newsgroups and forums, or directly with them through the TAP program. He now is a Senior Program Manager in the Configuration Manager Product Group, responsible for community efforts, such as forums, managing the MVPs, presenting at conferences, and working with TAP customers.

Oct 5, 2010

opalis: common errors while deploying an action server

in this post, I'm capturing a list of error messages as I run across them and documenting the problem.


error 2147023293 :: [0x80070643] :: fatal error during installation

this first one is a requirements issue.  however, you can't see it while you're deploying it.  as you can see below, the installation results in a failure.


checking the logs, it doesn't produce anything of further value.

2010\10\04 22:38:49.420 [0x80070643] <E> Error deploying Action Server to OPALIS2:

- _com_error "Fatal error during installation." "" "-2147023293"
however, when you check the logs on the action server you're deploying to, it becomes very evident why the installation failed to succeed (as highlighted below).
=== Logging started: 10/4/2010  17:38:47 ===
MSI (s) (C8:C0) [17:38:47:171]: Note: 1: 2262 2: PatchPackage 3: -2147287038
MSI (s) (C8:C0) [17:38:47:202]: Machine policy value 'DisableRollback' is 0
MSI (s) (C8:C0) [17:38:47:218]: User policy value 'DisableRollback' is 0
MSI (s) (C8:C0) [17:38:47:249]: PROPERTY CHANGE: Adding UILevel property. Its value is '2'.
MSI (s) (C8:C0) [17:38:47:280]: PROPERTY CHANGE: Adding ACTION property. Its value is 'INSTALL'.
MSI (s) (C8:C0) [17:38:47:311]: Doing action: INSTALL
Action start 17:38:47: INSTALL.
MSI (s) (C8:C0) [17:38:47:374]: Running ExecuteSequence
MSI (s) (C8:C0) [17:38:47:405]: Doing action: LaunchConditions
Action start 17:38:47: LaunchConditions.
This product requires Microsoft .Net 2.0 or higher.
MSI (s) (C8:C0) [17:38:47:483]: Product: Opalis Integration Server - Action Server -- This product requires Microsoft .Net 2.0 or higher.

Action ended 17:38:47: LaunchConditions. Return value 3.
Action ended 17:38:47: INSTALL. Return value 3.
=== Logging stopped: 10/4/2010 17:38:47 ===

if you can get away with installing .net framework 3.5, you might as well.  it will most likely be necessary in 6.3.


error 2147221164 :: [0x80040154] :: unable to connect to the remote machine

though this shows up in the console, it's also evident in the OISMC* logs.  here's what you may find:

2010\10\04 20:44:34.619 [0x80040154] <E> Error deploying Action Server to OPALIS2:

- Unable to connect to the remote machine with the OpalisRemotingService
- Cannot connect to the Escorter service on the remote machine
- Cannot instantiate "RemoteEscorter"
- _com_error "Class not registered" "" "-2147221164"

generally in this scenario, it's because of a deployment targeting an unsupported operating system.  usually this occurs because the operating system is x64 which is not supported until 6.3.  this blog post from the opalis team lists the new, supported platforms: http://blogs.technet.com/b/opalis/archive/2010/08/12/what-s-coming-in-the-next-opalis-release.aspx

this applies to deployment of the client console as well.


error [0x80070569] :: user account specified does not have rights

I'm not sure this actually requires explanation.  just make sure the account you're using for the install has the "log on as a service" permission.

2010\10\05 13:43:54.229 [0x80070569] <E> Error deploying Action Server to OPALIS2:

The user account specified for the Action Server does not have the "Log on as a service" user right granted. Please specify a user account with the proper rights or add the right to the account that was specified.


Oct 1, 2010

mvp award for 2010!




I really do love october.  for two reasons: it really marks the autumn season which is my favorite time of year, and it's my renewal time with the microsoft mvp program.

anyway, I got the email today. I'm in the program for another year! (by the way, it's a fantastic program!)

Congratulations! We are pleased to present you with the 2010 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in System Center Operations Manager technical communities during the past year.

congratulations to all my fellow MVPs who were awarded this month as well.