Tuesday, May 30, 2017

Tabulate OS Counts from Active Directory

For a couple smaller environments without ConfigMgr I wanted to know the versions of Windows, specifically the build # of Windows 10 so I knew counts of each version to target updates via WSUS or manually.

Over on the TechNet Gallery I found something that was real close written by Brian Arnold. The script will look at AD and count all OS versions and email it. I have this running on a monthly basis. Good "Executive Overview".

CountName
4Windows 10 Pro, 10.0 (10586)
3Windows 10 Pro, 10.0 (14393)
1Windows 2000 Professional, 5.0 (2195)
1Windows 7 Professional, 6.1 (7601)
1Windows 7 Ultimate, 6.1 (7601)
3Windows Server 2012 R2 Standard, 6.3 (9600)

I ended up modifying it a little as shown above. The bordering was not working right and I wanted to also get the version for Windows 10 in addition the friendly name. The script will spit to the console as well as email. I'm not that good with PS1 scripts so someone can do way better then my attempt. All credit to Brian.

The scheduled task is pretty simple:

 powershell.exe -ExecutionPolicy Bypass "Path\To\\CountOS\Get-OSCounts.ps1"  


Download

This script is provided as-is, no warranty is provided or implied.The author is NOT responsible for any damages or data loss that may occur through the use of this script.  Always test, test, test before rolling anything into a production environment.

You can obtain my modified version here.

Tuesday, April 25, 2017

Publish Exchange Online Calendar to Android

As with many firms out there, mobile devices fall into a BYOD strategy so I have come to really like the Outlook app for Android as it "containerizes" my work email. Over the years, I have tried them all from Touchdown to Boxer (formally Enhanced Email) and settled on Outlook currently. However they generally use ActiveSync so any security rules ActiveSync enables can take over the device. It is MY device, not my firms.

With that said though, unlike many people I use my work calendar for work related entries and my personal Google calendar (hosted on G Suite) for personal stuff, Android pulls from there. So my work calendar will just show a PTO block (marked out of office) for that appointment time (plus travel and what not) and my personal calendar shows all the details. Keeps things nice and separated.

The problem is that I live out of my mobile device so one thing I am challenged by using the Outlook app, is the calendar. While Outlook publishes contacts to the phone, that is all, nothing else. Strangely the old Outlook.com app would publish the calendar to the system though. I use and love a fantastic app app called Business Calendar Pro to manage all my calendars as well as give me one pane of glass via its widgets. All color coded and pretty.

On my Moto X (2014) I had both Outlook and Boxer syncing which means Boxer uses ActiveSync so it took over my phone but I got the calendar for my single pane as a compromise. Ick but I lived with it until recently when Samsung gave me a shiny new Galaxy S8 to use for a bit so I thought I would set it up differently, especially now that we have migrated to Exchange Online via Office365.

Sure enough there is a useful option out there, as long as your Office365 admin does not disable it, called Calendar Sharing. Very easy to setup though the process may change as Microsoft does change the Office365 online experience but as of this writing it is quick and easy.

Share Process


1. Access your Calendar via one of several methods:


2. Click the gear icon in upper right



3. Under Your App Settings, select Calendar


4. On the left choose Calendar publishing


5. Configure permissions by choosing either 'Full Details' or 'Limited Details'. The difference is Limited only shows day/time whereas full shows everything in the body such as Skype dial in info. Click Save when done.


6. Copy the ICS link a tthe bottom as you'll need it later.

7. Navigate over to your Google Calendar and on the left you will find Other Calendars. Hover over it and click the down arrow and choose Add by URL then paste the URL from step 6.


Now you have your Exchange Online calendar present in Google Calendar as Read Only. You can select the down arrow and rename, change the color etc. I have mine turned off on the web calendar as I only want it on my phone. Additionally I renamed to my company.


8. After your phone does its next sync, goto your favorite calendar app (mine being Business Calendar Pro) on your phone and enable the calendar. Bam! There it is.

Two things to point out again.


  1. This feature can be disabled by your Office365 Admin(s)
  2. It is read only
Since Outlook Online Calendar publishes as ICS or HTML you can use in other solutions as well.







Tuesday, April 18, 2017

Unhandled Exception Using Task Sequence Wizard to create Upgrade Task Sequence

Ever since the in-place Task Sequence was made available in 1511 I have been unable to create one via the wizard as I get this fun error:


Every other one worked, just not the upgrade (in-place) one. I usually create them from scratch so went that route and tabled getting this fixed. Originally I thought it may be a bug thats resolved in a newer release such as 1602 or 1606 so I checked again after upgrading to each of these versions. Received the same error so nope still broke, so once upgrade to 1606 we put in a Premier ticket over it with Microsoft.

They also thought it was a back-end issue so we provided dump after dump and log to no resolution. Once we were ready to upgrade to 1610 we tabled the ticket until that was complete. After 1610 the problem was still present so more dumps and logs submitted. Finally, Microsoft Support came back and had us uninstall and reinstall the console on the primary server. Fixed! In turn we reinstalled the console on the workstation systems it was installed on as well and those were fixed.

So this problem was NOT with the back-end infrastructure but with the local console install itself. All of our consoles were automatically upgraded whenever we upgraded ConfigMgr versions. Perhaps there is a bad DLL or other support file thats corrupt or not updated during a console update? Who knows. I may look into it some day to understand it. The fix is easy though.

So if you see an error like this, just re-install your console. Many ways to do this so take your pick. One way is via an elevated command prompt and navigate to the primary servers install folder, generally located at '\\SCCMServer\SMS_xxx\Tools\ConsoleSetup'


 pushd \\SCCMServer\SMS_xxx\Tools\ConsoleSetup  
 consolesetup.exe /uninstall /q   

PUSHD is a nice command to quickly mount a UNC path using your rights if you didn't know. Additionally, you can skip the /q switch to use the wizard. Once that is done delete the install folder which is generally located at %ProgramFiles(x86)%\Microsoft Configuration Manager. 

 consolesetup.exe /install  
 POPD  

You can remove the /install switch so it runs the wizard. POPD will unmount the share.

In my case I also have 1E Nomad so I had to do a repair via Programs and Features for '1E Nomad Branch Admin Extensions 2012'. Easy fix to a long term problem.

-Kevin