Category Archive: PowerShell

Dec 13

Hyper-V VM Performance Monitor – A tool is born

(Download link at the end of this blog) Monitoring Hyper-V On a medium to large Hyper-V platform it can be difficult to get all your VM performance data at once and see all metrics per VM in a nice overview or dashboard. Especially when you want to quickly identify a urgent performance problem on your platform and …

Continue reading »

Jun 22

Azure Federation – Manually modify support for multiple domains

The ‘ SupportMultipleDomains’ switch creates a third claim rule when you add or update a federated domain for the first time so the Office 365 relying party trust is configured to identify multiple domains. You’ll have to specify the ‘SupportMultipleDomains’ switch the first time you add a federated domain, otherwise the cmdlet errors out with the following …

Continue reading »

Jun 16

Multi-tenant Azure AD federation without the use of synchronization tools

Update: Added a multi-tenant PowerShell provisioning script to the TechNet gallery with examples mentioned in this blog. Download here. Introduction Microsoft is advocating their own synchronization tools (DirSync/AADSync/AADconnect/FIM) to federate with Azure AD. There are a lot of advantages using a synchronization tool, this way companies don’t need to develop their own solutions, it’s easy deployable, …

Continue reading »

Jun 09

PS One-Liner: #5 Create multithreaded processes

This one is a golden oldie and used for migrating data using robocopy.  Let’s start with a simple example.

First we begin with an array ”@(notepad…)’ where we define the processes to start. Then we use foreach ‘%’ which fetches each item in the array as a pipeline item ‘$_’ and then checks how many …

Continue reading »

May 26

Azure Demo : Batch Provision VM’s in thirteen data centers worldwide and manage them within 10 minutes!

Introduction When I got my Azure subscription, the first thing I was interested in was creating a VM somewhere else then in our data centers in Amsterdam and better yet in every available Azure data center in the world! This is not easy task to do via the portal or even with Azure PowerShell. Both …

Continue reading »

May 13

PS One-Liner: #4 Recycle and schedule Appools periodic restart

This will come in handy if you want to recycle specific or all AppPools which are consuming too much memory on the server. Of course you also want to avoid the memory problems in the future and don’t want to click every AppPool and set the periodic restart schedule. PowerShell to the rescue with just …

Continue reading »

Oct 07

ADMT Cross-Forest migration, the PowerShell way!

Introduction A while back, I migrated around 29K Exchange 2007 mailboxes and users with one PowerShell migration script cross-forest to Exchange 2010 into an in-house developed multitenant provisioning platform. Along these mailboxes there were also all kinds of AD Tenant related objects. All objects had to be provisioned in multiple domains in the target forest. …

Continue reading »

Sep 25

PS One-Liner: #3 PowerShell filewatcher


I was asked if I had something to watch a web.config file and if that file changed fire off good old robocopy. That’s a easy one, you ask I roll. Filewatcher coming up.

The while loop is just used for infinite looping purposes only and  executed every five seconds, ‘sleep’ is the alias for ‘start-sleep‘. …

Continue reading »

Sep 21

PS One-Liner: #2 Query all Events from all Event Logs between a specific time frame!


UPDATE: I made a GUI around it and published it on Technet, download it here! Did you ever found yourself in a situation where you couldn’t pinpoint the exact cause of a particular problem or you just need to know what exactly happened on your machine but can’t find the culprit? Unfortunately these things are quite …

Continue reading »

Sep 05

PS One-Liner: #1 Lowercase your text and paste it to the clipboard, batch style!


Because we had to comply with a naming convention in a system not managed by yours truly, I had to manually set each uppercase FQDN server name to lowercase in a GUI. Beware, I litterally HATE manual tasks which should and could be automated somehow even if took more time to script, there is always …

Continue reading »

Older posts «