Create an user

This script creates a new ad user based on the following:

  • display a gui form for information about the user
  • determines the username based on company standards
  • Sets some AD and profiles/home folder information based on the location of the user
  • sets the default AD groups
  • creates a mailbox for the users
  • creates homefolders and profile folders
  • creates a welcome note for the user, based on the users information

Read more »


ISE Steroids – a must have for powershell users

I went recently to a gathering of powershell enthusiasts and the discussion started about the tools we are using. One of the tools that got my attentions is ISE Steroids. I will try to explain why I think this is such a great add-on for use powershell users.


First of all, I am not a 24/7 powershell user. I manage windows systems and use a variety of different tools for this and of course I still use the mouse more frequently then the console. There is still a bright future for me somewhere 🙂

For some years I use powershell and I force myself to use the standard tools as they are everywhere available. Every system I manage has Powershell console and ISE on it.

This is untill the last meeting. When I heard of ISE Steroids and saw that the “big users” are enteusiast about it and use it on a daily bases, I started to download the tool for myself and started to view my own code with ISE Steroids.

This was an eye opener for me.

Read more »


Get detailed tracking information about specific email messages in Exchange

To receive detailed information from the tracking log use Get-MessageTrackingLog




Uninstall software from multiple computers

To uninstall software from multiple computers you must determine the name of the software you want to uninstall.

Get the list of installed applications from a computer:

If you want to see the programs on a remote computer user the -computername option.

Find the program you want to uninstall, for example “Sophos Patch Agent” from 3 computers:

This will uninstall the software (one at a time) from the computers.


Install software on multiple computers simultaneous

Install software on multiple computers simultaneous.

Also, first make sure the server from which you install the software accepts the CredSSP connection.

You need to use CredSSP for authentication because Powershell has a build-in protection against multi-hop use.

Run the next code to install the software.



Remove deduplication from a volume with powershell

First check if there is enough diskspace to expand the files to there original size, plus the size of the current deduplication database.

remove the optimization from the volume

See the results of the running Job:

Next, clean up the database. For this, deduplication must be turned on.

To turn on deduplication you can explude folders so the deduplication is running but does not do any dedup work.

When all is done, disable dedup and remove the feature.




Get Lockedout events from the security eventlog from the PDC

Script to Get Lockedout events from the security eventlog from the PDC



Show activesync users with powershell

Powershell command to display the users who uses Active-sync to connect with smartphones to the exchange server.


to count the users, place the result in a variable an use count.



Bypass the Windows Rearm Limit with Sysprep

Change the following Registry key value of GeneralizationState to 7



Change the following Registry key value of SkipRearm to 7

HKLM\SOFTWARE\Microsoft\Windows NT\CurentVersion\SL\SkipRearm

(For Windows 7)




Migrate DHCP server role from 2008 to 2012r2 with Powershell

Step-by-step instructions to migrate the DHCP server role from a windows 2008 server to a 2012R2 server with Powerhsell.

First install the migration tools on the target and the source server.


Import the servermigration tools on the source server (2008r2 in this case). Make sure the Migration tools are not alredy installed on the computer.

Next, export the settings on the source server

Next, copy the svrmig.mig file to the target server.

On the target server execute the following commands

Reboot the target server

Autorise the DHCP server in the AD

Discard the source DHCP server.


Remove approved devices from WDS

When you approve a device in WDS you may sometimes need to restart the process and change its name etc…

Simply deleting the computer account will give an error next time you try and pxe boot. You will also need to run the following command to clear all local cached copies of approved machines from the WDS server.

content from:


Copy the users from a ADgroup to another ADgroup

To Copy the users from a ADgroup to another ADgroup or duplicate the contents of a group, us the commandlet Add-ADGroupMember.

You cannot pipe the contents of Get-ADGroupMember to this commandlet as it does not accept pipeline imput. You can check this in the help of the command.

For this to work correctly you must place the content in a variable with Get-ADGroupMember and use this in Add-ADGroupMember.

These two command are:




Counting the number of active backups in Veeam and write this number in an XML file

This script is used for counting the number of active backups in Veeam and write this number in an XML file for further reference. I use Netcrunch as a monitoring tool and it can proces the content of XML files.


« Older Entries