Kent Agerlund and I spoke last week at MMS 2012. We had great feedback from the people that attended and we were the #1 session for Monday. Thank you to everyone who attended, we’re happy to share our knowledge!
Kent posted all the content we demo’d in our session. In addition I’ve also linked everything below. Please let us know if we missed anything that we demo’d.
Scripts and utilities that we demonstrated
Script to remove expired updates from you distribution points and update packages
Example used in the session:
cscript.exe DeleteExpiredUpdates.vbs /SMSProvider:CM01 /PkgID:"A010000E" /AssignmentID:"1;2;3;4;5;6;7;
Coretech Shutdown Utility to control computer restarts after patching
Example used in the session:
/t:300 /m:60 /d: “You computer has not been restarted for a week\” /f /c /ebM:168
Script (ConfigMgr package) to uninstall software updates
Example used in the session:
cscript.exe UninstallUpdates.vbs 976902
Coretech Application Creator:
Example used in the session: Created a pacakge, collection, 2 programs, 2 collections and 2 Active Directory security groups
Change source location:
Example used in the session: Modified source location for packages prior to migrating packages to ConfigMgr 2012
Reports to list last computer restart for Windows 7 clients:
SELECT os.Caption0 AS ‘Operating System’, cs.Name0 AS Name, DATEDIFF(hour, os.LastBootUpTime0, ws.LastHWScan) AS ‘Uptime (in Hours)’, CONVERT(varchar(20),
os.LastBootUpTime0, 100) AS ‘Last Reboot Date/Time’, CONVERT(varchar(20), ws.LastHWScan, 100) AS ‘Last Hardware Inventory’
FROM v_GS_WORKSTATION_STATUS AS ws LEFT OUTER JOIN
v_GS_OPERATING_SYSTEM AS os ON ws.ResourceID = os.ResourceID INNER JOIN
v_GS_COMPUTER_SYSTEM AS cs ON cs.ResourceID = os.ResourceID
WHERE (os.Caption0 LIKE ‘%Windows 7%’) AND (ws.LastHWScan <> 0) AND (cs.Name0 IS NOT NULL)
ORDER BY Name
The Deployment Bunny has posted another great blog post on Modifying the Lite Touch Wizard.
This is the second part of a story around the MDT Wizard and the Wizard editor and the saga continues, but this time it’s going to be a bit more tricky since we need to add information to the wizard that does not exist by default in MDT. Last post was easy in the way that we just created a new page in the wizard that displays existing environment information, now the game has changed and my customer wants to have some hardware information, something like this:
The reason of having this page is to be sure that the machine has the correct hardware configuration, things like correct BIOS version, memory, CPU configuration but also to see that it has the Mac address that we “assume” it have. Also, we want to know if the model alias user exit script works correct and sets the correct model alias since we use that as a part of the driver group.
When I was working for a customer a while ago, they asked me if it was possible to modify the Wizard in MDT and of course I answered yes, since that is possible. They wanted many things and in this post I will cover the easy stuff. and that is reading from the existing environment and present it on screen during the deployment…
The requirements was pretty easy, something like…
-Could you help us to create a extra page in the wizard that will help the local tech to be able to see and verify that everything is correct when he is deploying the machine?
-You mean something like this?
-Yes, that would be ok, thank you.
Keith over at Xtreme Consulting has created a nice wizard driven tool for adding boot images to a USB flash drive. This is designed to work with MDT 2010.
Excellent work Keith!
This information is provided as-is, you at your own risk.
Updated my HTA for creating AD groups and collections with a few tweaks and wanted to post the new version. I originally blogged an older version here. I had taken an HTA from SMSUtils and heavily modified it to do what I needed. I have since updated it with some additional appearance changes, and the big change is that I added support for R3’s “Dynamically Add New Resources” to the collection. You can now select that as an option to set when creating collections.
Updated to V1.6: Added sorting function to drop downs
Updated to V1.5: Added option to pick collection update times
Updated to V1.4: Some other formatting changes were made as well.
New support for ConfigMgr R3:
I also tweaked the logging window so that it’ll automatically scroll as you create multiple entries.
I hope you find this tool as useful as I have over the years.
Maik has updated the Deployment Web Service to V7. This is a pretty easy upgrade from V6, you just need to replace all the files in your virtual directory with the new files, minus your web.config as that hasn’t changed and saves you from reconfiguring, and then recycle your app pool.
Here are some of the updates:
– AddComputer (MACAddress, UUID, ComputerName, SiteCode) : Adds a new computer to SMS/SCCM and returns the ResourceID if successful
– ClearLastPXEAdvertisementForCollection (CollectionID, SiteCode) : Clears the last PXE advertisement flag for all computers in the specified collection
– ClearLastPXEAdvertisementForComputer (MACAddress, UUID, SiteCode) : Clears the last PXE advertisement flag for the specified computer
– ClearLastPXEAdvertisementForComputerByID (RessourceID, SiteCode) : Clears the last PXE advertisement flag for the specified computer
– DeleteComputer (MACAddress, UUID, SiteCode) : Deletes a computer from SMS/SCCM.
– DeleteComputerAssociation (ReferenceComputerMacAddress, ReferenceComputerUUID, DestinationComputerMacAddress, DestinationComputerUUID, SiteCode) : Deletes an existing association between two computers
– DeleteComputerAssociationByID (ReferenceComputerResourceID, DestinationComputerResourceID, SiteCode) : Deletes an existing association between two computers
– DeleteComputerByID (ResourceID, SiteCode) : Deletes a computer from SMS/SCCM
– GetComputerName (MACAddress, UUID, SiteCode) : Returns the name of the specified computer
– GetComputerNameByID (ResourceID, SiteCode) : Returns the name of the specified computer
– HasAdvertisement (MACAddress, UUID, AdvertisementID, SiteCode) : Checks if a specific advertisement is available for the specified computer
– HasOSDAdvertisementByCollectionID (MACAddress, UUID, CollectionID, SiteCode) : Checks if an OSD advertisement is available to the specified computer limited by a specific collection
– RemoveComputerFromCollection (MACAddress, UUID, CollectionID, SiteCode) : Removes a computer from the specified collection
– RemoveComputerFromCollectionByID (ResourceID, CollectionID, SiteCode) : Removes a computer from the specified collection
– SearchComputerByName (SearchString, SiteCode) : Returns a list of computers with the supplied search string as part of their name/netbiosname
– GetComputerParentPath (ComputerName) : Returns the LDAP path to the parent object of the computer (helpful to save the current OU of a computer at the beginning of a deployment)
Fixed a bug in the GetComputerNameByNetbootGUID and SetComputerDescription functions.
– GetComputerRoles (SerialNumber, AssetTag, MacAddress, UUID) : Returns a list of Roles assigned to the computer
If you have ever wanted to hide that black cscript window in your custom wizard or pre-execution hook, read more here. Nice post showing you how to get rid of the window.
I had previously done a bunch of work on making my custom boot wizard a certain size and centered, and it just didn’t always look as good as I wanted it to with various screen resolutions. So I’ve resorted to simply always making sure the window is maximized 🙂
Open your wizardeditor and go to your global pane. Then you will want to add a customstatement and put the following text in:
window.resizeTo screen.availWidth, screen.availHeight
That’s it, save your changes, update your boot image, and test. You should now have a front-end that is maximized and no longer need to worry about it being centered or large enough to contain your information.
Nice little HTA by Sherry Kissinger that will check your primary sites to verify that backups have run and give you the status. Basically just reads the logs for you and displays the results instead of you having to read the logs on each site server.
Looks like this:
And returns the results like this once ran.
File is attached below.