PowerShell function to get all nested group members in Active Directory
Last week a fellow Dutch IT Pro named Kees Baggerman mentioned something about the ability to use PowerShell to report all members of the Domain Admins in an Active Directory. So just for the fun of it...
View ArticlePowerShell oneliners to get information about your Active Directory...
Some time ago I was asked to write a script which does an inventory of an active directory, such as finding all domain controllers, all global catalog servers, all sites/subnets, etc… I will not be...
View ArticleGetting information about network adapters with PowerShell
In PowerShell v3 we’ve got a new cmdlet: Get-NetAdapter. So, what can we do with this? First, what output does this cmdlet give us? Command: Get-NetAdapter So could you use the help feature in...
View ArticlePowerShell oneliner to enable VM Network Optimization in VMM
Here’s how you can enable the VM Network Optimization on all network adapters on a VM: Get-VM -Name VM01 -VMMServer localhost | Set-VirtualNetworkAdapter -VMNetworkOptimizationEnabled $True And here’s...
View ArticleMicrosoft Script Explorer for Windows PowerShell hits Release Candidate
Microsoft® Script Explorer for Windows PowerShell has reached the RC milestone . You can download it here: http://go.microsoft.com/fwlink/?LinkId=246229 With this release you can: · Find PowerShell...
View ArticleJoin or unjoin a computer to a domain through PowerShell
With PowerShell 2 this was done through WMI, specifically by using the Win32_ComputerSystem class and the attached JoinDomainOrWorkgroup method. Here’s an example of how this could be done: $comp =...
View ArticlePowerShell – Howto Update the GAL and OAB in Exchange
This morning I was asked to update the Global Address List and Offline Address Book in an Exchange environment. You could wait for Exchange to do it automatically (the default schedule is once a day)...
View ArticlePowerShell – Change the update schedule for the GAL in Exchange
In my previous post I write about updating the GAL and OAB in Exchange. But what if you want to change the default update schedule? There’s a PowerShell command for that… get-offlineaddressbook |...
View ArticleNetwork mapping unavailable in installation wizard
Problem: Today I experienced a funny issue when installing an application. The installation guide told me to create a network mapping to a file share on a server and use it as the target path for the...
View ArticleMy visit to the Microsoft Netherlands Company Meeting
Some time ago I got contacted by a Microsoft employee from The Netherlands asking me if I would be interested to ‘speak’ at the Company Meeting from Microsoft Netherlands in Amsterdam. This because he...
View ArticlePowerShell – Function to get the UAC configuration on local or remote computer
function Get-UAC { <# .SYNOPSIS Gets the current status of User Account Control (UAC) on a computer, locally or remote. .DESCRIPTION Gets the current status of User Account Control (UAC) on a...
View ArticlePowerShell – Function to configure UAC on local or remote computer
function Set-UAC { <# .SYNOPSIS Enables or disables User Account Control (UAC) on a computer, locally or remote. .DESCRIPTION Enables or disables User Account Control (UAC) on a computer, locally or...
View ArticlePowerShell one liners for Hyper-V demo and training environments
Today I’m attending the ITCampNL in Eindhoven where two Microsoft employees are giving a workshop on Hyper-V in Windows Server 2012. One of the things they asked me on the spot were a few management...
View ArticlePowerShell oneliner to configure Processor Compatibility on VMs in Hyper-V
Sometimes you need to configure the processor compatibility on virtual machines when you need to migrate them between servers that have different processor types (note: types, not brands!). Here’s a...
View ArticlePowerShell oneliner to change virtual switch settings on virtual machines
Recently I’ve been asked howto use PowerShell to modify the virtual switch setting on VMs. Specifically they wanted to migrate 30+ IIS virtual machines from one virtual switch to another. This was...
View ArticleVMM – PowerShell oneliners to set VM Network Optimization (Part 2)
Some time ago I wrote a blog post PowerShell oneliner to enable VM Network Optimization in VMM Last week I received a question about this post: Howto accomplish this on only VM’s on a specific cluster,...
View ArticleWindows RT has PowerShell
Yes, you’ve read the title correctly… Windows RT has PowerShell! And here I was afraid that RT would be a totally stripped Windows version, so no PowerShell… But there seems to be someone at Microsoft...
View ArticleUse PowerShell to write to the event log
Whenever writing scripts that are intended to automate something I always want to leave something behind so I can see if the script has run correctly. Sometimes this can be as easy as a report to a...
View ArticleUpgrade your Windows Server edition without a re-install
Back in the ‘old days’ there were , just as right now, different version of Windows Server. Whenever you installed the Enterprise Edition and realized you should have chosen DataCenter edition, you...
View ArticlePowerShell Workflow Foreach Parallel limited to 5 parallel threads
Some time ago Aidan Finn, one of my Hyper-V heroes, contacted me with a PowerShell question. Until that time I was able to help him quickly with every question he has thrown at me the last year… but he...
View Article