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 more

WaaS–Post 2–In Place Upgrade TS

WARNING... WORK IN PROGRESS...  This has been in my drafts for a couple months, I'm pretty busy so I don't know when I'll get to polish it, so for now, just publishing it with intent to go back and update it.  Since I wrote this, there has been several changes already, due to advances in CM, finding bugs, etc.  Anyway, because this is really never going to be 100% done, just going to click publish now, so you can start playing with it...
PS.. Mike Terrill is working on a very detailed blog post that will hopefully answer many of your questions as well, but he is waiting for making his more polished, he takes more pride in his blog posts than I do. 🙂

Download the Task Sequences and Content ---> HERE <---  I will try to keep that updated as I update my Lab's TS

Ok, so about a couple weeks ago, I posted the Pre-Cache Compat Scan Task Sequence, in Part 1, now it’s time to go over the IPU.  It’s taken a couple weeks as I keep updating, refining, and finally came to the realization, I could keep tweaking this forever and never get around to posting.  So, I figured, I should just post this, even if it’s not 100% complete.  Just this should be pretty helpful to many.

Read more

Update CCMCache Size via PowerShell

Super short post, just more for self-documenting.

I found tons of scripts out there to do this, but they all required having to reset ccmexec before the cache size updates.  So… if you do it from the control panel, you don’t have to reset the service…  what were those scripts doing wrong, that the control panel was doing right?  Mike Terrill told me… the Control Panel uses the COM object, so lets just do that with Powershell!

Super Simple (1 Line!)
Sure you can break it out into more lines if you’re going to make a script to make it more “read-able”, but I like 1 liners.

in PowerShell:
New-Object -ComObject UIResource.UIResourceMgr).GetCacheInfo().Totalsize = "25000"

In Task Sequence Run Command Line Step:

powershell.exe -command "New-Object -ComObject UIResource.UIResourceMgr).GetCacheInfo().Totalsize = ""25000"""

Originally Posted on GARYTOWN.COM

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 more

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 more