Thursday, April 25, 2013

Utilizing Fall back for Software Updates in 2012 Sp1

"Starting in Configuration Manager SP1, you can configure a client on the intranet to download software updates from Microsoft Update if a distribution point is not available. "

Now that we have a way to make clients download updates from the Internet when an update is not found on a distribution point.   This is a unique feature but it does require updates be download and on at least 1 DP.

Now how can we utilize this new feature to cheat the clients.  This is how:

Scenario: Company of 15,000 machines has 300 machines left on Vista and 400 on Windows XP.  Network bandwith to the DP is limited and there are no more than 10 machines at each site.  This company is special because they have a proxy link to the Internet so all non-business traffic is sent directly to the internet.  But they must still patch all these computers.

Solution: Pick a single DP to hold the Vista and XP patches.  Create your Software Update Groups as usual but only deploy them to a single DP.  Why?  The XP/Vista clients will look at the local and remote DPs for software updates.  You must check both Boxes to "Download and install".  They will not find the updates so it will fail over to the Internet. Because the number of machines is small the company will not feel the internet traffic download and the admins don't need to distribute Vista or XP patches all over the world. 

This was not meant for the way I am pushing it but it does work. 

What it solves:
1. No network traffic to random DPS for Vista and XP patches
2. DP queue is open for other distributions.
3. Clients patch and compliance number will continue to rise
4. OS patches only need to be on 1 DP

Note: CU1 is required is you are running over alternate ports.  This corrects and issue of the client trying to use the alternate ports to contact Microsoft Updates

Wednesday, April 24, 2013

Clear out the Unprovisioned Collection in 2007

Do you have issues with unprovisioned machines that stick around.  Here is some code to help you get rid of the unprovisioned machines.  This can be run at differnet intervals during the day or week depending on when you see it.  This is old that is in Vbscript.  Hopefully I can get going in powershell and get with the program.  :)

Dim Args 
Dim swbemLocator, SWbemServices, objCollection, oProviderLocation, oLocation  
Dim strComputerName, arrComputers, objComputer, sCollectionIDs
Dim objDirectRule
Dim strmessage, objshell

'CollectionIDs from which to remove the computer
sCollectionIDs = "ABC0019D"

'Main script
set objShell = CreateObject("WScript.Shell")
    Set swbemLocator = CreateObject("WbemScripting.SWbemLocator")
    swbemLocator.Security_.AuthenticationLevel = 6 'Packet Privacy.
    Set swbemServices = swbemLocator.ConnectServer(".", "root\SMS")
    Set oProviderLocation = swbemServices.InstancesOf("SMS_ProviderLocation")
    For Each oLocation In oProviderLocation
        If oLocation.ProviderForLocalSite = True Then
            Set swbemServices = swbemLocator.ConnectServer(oLocation.Machine, "root\sms\site_" + oLocation.SiteCode)
        End If       
Set arrComputers = SWbemServices.ExecQuery("select * from SMS_R_System WHERE Unknown=1")
For Each objComputer In arrComputers
   'DElete special..this will delete the machine from the system
Set SWbemServices = Nothing
Set SWbemLocator = Nothing


Clear out OSD collections in 2007

Do you have OSD collections in 2007 that you drop machines into for imaging.  What happens when  a machine fails to image completely or send the completion code and remove from the collection.  Well they say in an users see that "Operating System Deployment is ready..."  so here is some code to help you remove computers from a collection, create a task on the primary site to run at a given time:

    set objShell = CreateObject("WScript.Shell")
    Set swbemLocator = CreateObject("WbemScripting.SWbemLocator")
    swbemLocator.Security_.AuthenticationLevel = 6 'Packet Privacy.
    Set swbemServices = swbemLocator.ConnectServer("US1153SCCMC03", "root\sms\site_C03")
    sCollectionIDs = "ABC00052:ABC00054:ABC00053:ABC00055"
    mCollectionID = Split (sCollectionIDs, ":")

for i = Lbound(mCollectionID) to UBound(mCollectionID)
    query= "SELECT ResourceID FROM SMS_CM_Res_Coll_" & mCollectionID(i)   
    Set arrComputers = SWbemServices.ExecQuery(query)
    For Each objComputer In arrComputers
       RemoveCollectionMembership objComputer.ResourceID,mCollectionID(i)
Set objCollection = Nothing
Set SWbemServices = Nothing
Set SWbemLocator = Nothing
Sub RemoveCollectionMembership(intresourceid,CollectionID)
 on error resume next
 set objCollection = SWbemServices.Get("SMS_Collection='" & CollectionID & "'")
 set ObjDirectRule = SWbemServices.Get("SMS_CollectionRuleDirect").SpawnInstance_
 ObjDirectRule.ResourceID = intresourceid
 ObjCollection.DeleteMembershipRule objDirectRule
End Sub

Tuesday, April 16, 2013

Microsoft System Center Virtual Machine Manager 2012 Cookbook

Get moving on a new cookbook from PACKT Publishing!

VMM quickly becoming a prime job profile.  Read this cookbook to get you on right track.

I hope to have my copy soon and give it a good once over....

Saturday, April 6, 2013

2012 Console Extensions for 2012 SP1 Cu1

So I have been a bit busy lately with my 2012 Migration.  You have seen last year that I produced all the xml folders and files for the 2012 RTM extensions.  Well here is the updated version all the way up to CU1.  I haven't looked to see any of the Guids changed in CU1 but I wanted to make the note incase something did change.  If you try this on your Sp1 system and you are missing some guids, please drop me a line and I will see if I can spin up a 2012 SP1 site and export the guids. 

Realize that not all Guids are accessible, even if I have them listed.  What I am simply doing is pulling out all GUIDS the Microsoft references.  Nodes that are created on the fly when you click Show members don't have a guid and can't be accessed because they are dynamic nodes and are destroyed when you navigate away.

Please see this post to add images:

Also reference in the SDK are console extensions and how to add images and further manipulate the console.

Console files should be added here :
%ProgramFiles%\Microsoft Configuration Manager\AdminConsole\XmlStorage\Extensions\Actions\<GUID> folder, where <GUID> is the GUID identifier for the node that the action applies to.

Be aware that the console doesn't abide by file extensions so you can call the file .XXX and the console will still attempt to load it.  If you don't want it loaded then you should create a sub folder and then The console will ignore it. 

Please DO NOT install this on a production box.  The 620 console extensions here can cause the console to be slow or have problems.  I have broken down the folders into the different workspaces referenced.  Not all GUIDS will work, I simply export what Microsoft has.  If you find a problem with the same GUIDS you will need find the offending folder and delete it. 

The zip file can be downloaded here : 2012SP1CU1 Actions

Play responsibly :)