Skip to main content

Posts

PowerShell : Hunt CheckBox of Doom

I had posted a while back about the dreaded Checkbox of Doom which is a real pain in the Migration Scenarios where few AD Users might be marked as protected (Admincount = 1) but we don't really know which Group membership (marked as protected) might be causing this.  Shout out to MVP Ace Fekay for providing his insights on the topic :) It becomes a pain when the Groups are nested multiple levels and to determine which Portected Groups membership the User have which might be causing the Inheritance disabled (checkbox of doom). [Update]  Fellow friend and MVP Guido Oliveira highlighted that he had come across an issue where the AdminCount was once set to 1 when the User was part of a Protected Group. Once he was removed from the Group as per the Wiki Link shared at the end the AdminCount and the Inheritance will still be disabled so this Function can hunt those accounts too. Function is up for download @Technet : Click Here Read below on how to use the Script and...

PowerShell Tip : Comment/Uncomment Code

Many people who use plain Vanilla ISE are not familiar with this small trick which was added in PowerShell v3. In PowerShell v3 ISE you can comment/uncomment lines of code without installing any Add-Ons : Comment Code : Press Alt + Shift + Up/Down arrow key to select lines Once lines are selected, Press "#" to comment Uncomment Code : Follow the same Key shortcut to select text [Alt + Shift + Up/Down]. Once selected , Press Delete . Below is a animated GIF showing this in Action :

PowerShell + Azure Automation : Add-DataDiskToVM

This will be a quick and short post on using Azure Automation Runbook to add a Data Disk to one of the Azure VMs already provisioned on Azure and then initialize-format the Disk added using the Storage cmdlets available on Server 2012 onwards. The Workflow is available @Technet >> Download [Blog-Ad] Please check two of my earlier posts revolving around Azure Automation, if you are trying to use this feature for first tim: PowerShell + Azure Automation : Deploy a Windows 10 VM (Server Tech Preview) & domain join PowerShell + Azure Automation : Unleash the Automation Cmdlets Below is the explanation of the Workflow:

PowerShell + SCCM : Get Resource Collection Membership

Recently at our PowerShell Bangalore User group, we had fun participating in a one day PowerShell + ConfigMgr Hackathon event. Where we had a bunch of ConfigMgr admins worked on using Azure to deploy a full fledged ConfigMgr Lab, also we had fun interacting with each other. Below pic was the theme for the event, says it all ;) My friend Harjit  suggested few ideas for the Hackathon. Below is one of the ideas: " Script that can tell me which collections a particular system or several Systems belong to " The Final Script is available @Technet for Download      

PowerShell + EAS + MSExchange - FolderSync

This is the third post in series of poking around EAS protocol using PowerShell, find the first 2 posts below : PowerShell + EAS : Getting Started PowerShell + EAS + MSExchange : Autodiscovery If you are a interested in looking at the C# code samples then checkout posts  @MobilityDojo.net in the Resources section at the bottom. Once you have discovered the URL of the EAS endpoint to connect to, it is time to follow below 3 requests in order to establish an ActiveSync Partnership with Exchange Server:

PowerShell + EAS + MSExchange : Autodiscovery

This post is going to be on how to use PowerShell to get an insight in the Autodiscovery process which the EAS Mail clients use. Second entry in my #PowerShell + #EAS posts: PowerShell + EAS : Getting Started Once you enter Email Address and Password in the Mail setup in the device, the Autodiscovery process kicks in. Remember there is no such thing as the mail account getting magically configured :) To explain the process is not my intent, Please refer to the MSDN blog post here . In short the Autodiscovery process tries to get a valid XML response from 4 sources (based on the workflow explained at the MSDN blog ). In this post we will be looking at a way to make those 4 requests and study the responses we get back using PowerShell. This is a more of a hands on approach here. I will be taking an account for the demo, for which we will see the discovery process in action : TestUser Account on Office365   (testuser@dexterposh.in) The EAS clien...

PowerShell + EAS : Getting Started

This is the first post on a series of blog posts concentrated around understanding Exchange ActiveSync Protocol as this is the underlying protocol which Mobile devices use in order to connect to the Exchange Server. The whole idea is to be able to craft EAS requests and parse the Server responses using PowerShell in order to understand the protocol better. Hint - Take a look at the cmdlet Invoke-WebRequest, it will be used to craft the Web requests later on. Why I want to do this ? Because when you start poking around you learn the Product better :). This is a getting started post and I am following and porting most of the code already written in C# at MobilityDojo.net  to PowerShell. This post is about giving you a hang of how to make Web Requests to an Exchange Server's EAS endpoint and parse them to get insight in the process. Now if you setup mail for a User in a Mobile device and use Fiddler as reverse proxy to analyze the communication , you will see the belo...