Tag Archives: function

Powershell: Invoke-Sound function

I stumbled upon this brilliant powershell function for playing sounds using powershell, check it out:¬†http://community.spiceworks.com/scripts/show/1337-powershell-function-invoke-sound He even added a switch for playing the imperial march from Star Wars    

Posted in Microsoft, Powershell Tagged , ,

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 , , , , , ,

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 , , , ,

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 , , ,