Category Archives: Microsoft

Powershell function for enabling a user for Lync and configure settings

A little while ago I posted a script for enabling users for Lync and settings some settings for that user. That script has been used here ever since I posted it and it has worked like a charm. However there’s … Continue reading

Posted in Lync, Microsoft, Powershell Tagged , , , , , , ,

Powershell function for gathering users in groups

A friend of mine asked me a couple of days ago if I knew a way to gather users who are members of given groups. I thought to myself “Hmm, challenge accepted!” and started writing a small powershell script. After … Continue reading

Posted in Active Directory, Microsoft, Powershell Tagged , , ,

Motivational Powershell function

If you are ever in need of some motivation, here is a very simple Powershell function for that: function Motivate-Me { $motivator = Get-Random -Minimum 1 -Maximum 5 if ($motivator -eq 1) {Write-Host “You are a Powershell God!”} if ($motivator … Continue reading

Posted in Microsoft, Powershell Tagged , ,

Powershell function for showing some system information

This is a function I created just because I wanted to toy around with Powershell and get-wmiobject. Also, this is my first function where I made it possible to use a switch parameter. What the function does is gather some … Continue reading

Posted in Microsoft, Powershell Tagged , , , , , ,

Adding a pause to you Powershell scripts

If you have taken a look at some of the scripts I have posted earlier you might have noticed a rather strange line, usually at the end of the script: cmd /c pause | out-null This was actually just to … Continue reading

Posted in Microsoft, Powershell Tagged ,

Powershell function for rotating event logs

A friend of mine came to me with an interesting powershell challenge today: how can I use powershell to archive and clear event logs? Well, challenge accepted! The reason the challenge arose is due to maintenance he performs on a … Continue reading

Posted in Microsoft, Powershell Tagged , , , ,

“The given Key was not present in the dictionary” error when running Group Policy Modeling

I ran into a rather strange error today when trying to run Group Policy Modeling on a user. Instead of showing me Summary and Settings I received an error stating that The given Key was not present in the dictionary. At … Continue reading

Posted in Active Directory, Microsoft Tagged , , , ,

Function for locating an email address

Yesterday I was given a relatively easy task: find out who or what has a given email address. As this was within our own Exchange organization it proved to be quite simple: You can achieve the goal with a simple … Continue reading

Posted in Exchange, Microsoft, Powershell Tagged , , ,

Function for adding photo in Active Directory

I have always been careful to avoid the really advanced and cool stuff in Powershell, like functions, arrays and such. But as I created the last script it hit me that it would be really cool to have it in … Continue reading

Posted in Active Directory, Microsoft, Powershell Tagged , , ,

Simple script for adding user photo in Active Directory

It’s been a while since I posted here so I thought it might be time to add some content. This script is a simple script that adds a photo to a user’s active directory user object. It also checks the … Continue reading

Posted in Active Directory, Microsoft, Powershell Tagged , ,