Friday, December 16, 2016

Automatic Removal of software in SCCM (Link to other Blogs)

This is more of a reminder for myself, but wanted to share with you a couple of blog posts that can help you with automatic software management using Software Metering with SCCM.  If you have Orchestrator in your environment you can take things a step further and do cool things like automatic approvals based on license count and approval cancellation after a specific time.


System Center Dudes:
https://www.systemcenterdudes.com/sccm-automatically-uninstall-application/


Neil Peterson - System Center Premier Field Engineer
https://blogs.technet.microsoft.com/neilp/2012/11/27/software-metering-deep-dive-and-automation-part-1-use-it-or-lose-it-the-basics/


https://blogs.technet.microsoft.com/neilp/2012/11/28/software-metering-deep-dive-and-automation-part-2-use-it-or-lose-it-the-collections/


https://blogs.technet.microsoft.com/neilp/2013/01/02/software-metering-deep-dive-and-automation-part-3-use-it-or-lose-it-the-orchestrator-runbook-automation/


I have been using the SCCM/SCORCH method in my environment for a few years now and it works great until recently .. had to scramble to find these posts so that I could fix a mistake that was made.


Enjoy!!

Wednesday, November 30, 2016

Time display issue in Windows 10 1607 after in-place upgrade

Wow, it has certainly been a long time since the last time I've posted on this blog!  While I keep promising to post more, chances are I'll get busy again and won't have time to post .... which is the perfect segway to todays topic:  TIME!


Lately I've been designing a company-wide migration to Windows 10 1607 using the in-place upgrade option with System Center Configuration Manager Current Branch.  One issue that came up was time ... or rather display time ... being WAY off (and by way off I mean hours, up to 3 hours in some case).


Now you may be thinking "But Terry, doesn't that mean your users can't log in?" ... and the answer is .. well .. no!  See, the issue being experienced only affects the time that is displayed on the system tray and lock screen, not the system time.  System time is critical for domain-joined systems as if you are off by more than 5 minutes, you can't authenticate with AD, so the default behavior is workstations sync time with your local Domain Controller or the PDC Emulator.  System time is done in UTC, and Display Time is UTC +/- your time zone offset.  This means that it is technically possible for time to be correct and incorrect at the same time!


How to tell if you have this problem


  1. Open Windows PowerShell (right-click Run As Administrator, you will find out why later)
  2. Type this command:  w32tm /query /peers
If time is configured correctly then it should be pointing to a local Domain Controller or the PDC Emulator.  Note that if you have specific group policies around workstation time configuration, then you will need to make sure that it matches.  In the case of an affected machine, it will show the following: (i'll post a screenshot shortly)


Peer: time.microsoft.com,0x9
State: Pending
Time Remaining: (up to 24 hours, in seconds)
Stratum: 0


In my case I have systems spread out over multiple time zones.  In some cases the time displayed properly but it was not syncing from the local DC.  In other cases the display time was out by up to 3 hours!.


How to fix the problem


You still have that PowerShell window open right?  Here are the commands you need to run (in order):


  1. Stop-Service w32time
  2. w32tm /unregister
  3. w32tm /register
  4. Start-Service w32time
  5. w32tm /resync
Once finished you can run w32tm /query /peers again.  If you see something like this, then you are good:


I put these commands into a PowerShell script and put it at the end of my in-place upgrade Task Sequence in Configuration Manager:


And there you have it!  What do you think?