Run PowerShell ISE as System to Test scripts… From Software Center

Yet another post caused by my recent rebuilding of my lab from scratch after I totally hosed my last CM Server.  This time I’m documenting (blogging) a few additional things. So you write a lot of scripts for ConfigMgr?  Notice that they sometimes don’t perform quite as expected because they run as system instead of ... Read moreRun PowerShell ISE as System to Test scripts… From Software Center

Tweet from PowerShell... Customized for a TS

Ok.. another one that's been in my drafts for the past 3 months, Seems to work fine, however if you run it in a TS over and over and over again because you're testing constantly, it seems to skip some, like Twitter blocks duplicate Tweets. Anyway, here ya go.  If you have any improvements, please get ahold of me.

-----

Hey Folks, so I am at MMS right now, and I saw a lot of demos were people were tweeting from at Task Sequence using Orchestrator. I was like, um.. that seems like a lot of work to just tweet, I don't want to support another server, hopefully it's actually doing more than just tweeting. I set this up a while back for fun, and forgot to blog it, so here it goes. The hardest part... was already done by Adam! I stole his work, and built on top of it. You've probably noticed that is a theme on my blog, I like to borrow the hard work of other and twist it for my own purposes, of course giving credit where credit is due. I hope you are doing the same to my blog, and please give me a shout out if you take something I've done and add to it, and then blog it for everyone else to use!
So I started here, Adam's  Blog.  This provided the connections to Twitter.  I created a new account specifically for my blog (@garytownblog) and set it up in his script, which he explains in great detail.  So Part 1 ... Go there and do that..

Read moreTweet from PowerShell... Customized for a TS

Automatically Capture Hard Blocker

This was one of Keith S. Garner’s (@keithga1) gifts to me before he parted ways on his new adventure.  I asked him for a script to automatically pull the Hard Blocker from the compatdata XML file created during the Windows 10 compatibility scan.  After I gave him my request, he hit me up on skype about 2 hours later and said he didn’t write a script, he wrote me a 1 liner.  Keith knows how much I like 1 liners.  Why?  Task Sequences!  If I don’t have to have content to accomplish a step, all the better!  I've been known to build scripts on the fly using echo >> script.bat then running the script.bat file just so I don't have to have content.

So what’s this magic 1 line of code?  I'm getting to that.

Read moreAutomatically Capture Hard Blocker

Customize SetupComplete.cmd and SetupRollback.cmd

Why?  Ever want to run a few tasks after upgrade, or more importantly, ensure a few things happen if the upgrade goes south and rollsback?  Why not hitch a ride on what ConfigMgr is doing natively and add a few things you need.

Supported?  Highly unlikely.  Please test, and please don’t say “Gary did it” as rationalization when someone asks why you decided to do this.

Do you do it?  Heck yes I do, in my lab.  Need to get a little more test results before implementing in Production

How do you use it?  I’m not telling! Oh wait, that’s why I’m blogging.  I modify the SetupRollback.cmd to ensure the machine is pulled out of provisioning mode when it the upgrade rolls back, and to set a registry key for our reporting, and trigger hardware inventory.

More background.
ConfigMgr has two files in the c:\windows\ccm folder that it uses:

  1. SetupCompleteTemplate.cmd
  2. SetupRollbackTemplate.cmd

Read moreCustomize SetupComplete.cmd and SetupRollback.cmd

Windows 10 Lock Screen

So, you think you’re setting the lock screen, just to have OSD finish and be like “Why is the lock screen missing and showing a dark blueish color?” or “Argh, it’s the stinking Windows default lock screen, not the one I wanted”. Perhaps you have a lab, and don’t activate your PC’s, so you get the rotating Bing Picture of the day, which is actually pretty cool and all, unless you’re trying to test Lock Screens.  Thanks to Doug (managedoug.com) for bringing this to my attention and having me dig into it a bit more.

I’ve got Several Steps to control this during OSD which include Copying Files over the default lock screen images, and setting registry keys, basically depends on exactly what outcome you’re looking for.

Scenario 1, you want to set the Lock Screen and NEVER allow the user to change it.

Scenario 2, you’re cool with the user changing it, but want to set it to your own custom default.

To accomplish both, there are several things in common you need to do, so I’ll start with the steps you need to do for either situation, then break apart the single additional step that enables scenario 1.

Read moreWindows 10 Lock Screen