Discovering the netboot GUID of virtual machines

So tonight I was playing around with deployment at home. Having tried both System Center Essentials and System Center Configuration Manager, it was time for another deployment solution. Since my company has a sister company specializing in system management software, I decided to give them a try. After installing I needed to find the netboot GUID since I didn’t really like using the mac address. So how do I get the netboot GUID of my Hyper-V virtual machines? Well powershell of course.

The powershell snippet: [Read more…]

Getting rid of special characters

So you want to create the username based on the name of the person. Well if the person is of nordic decent he/she might have funny characters that might brake your scripts. So how do we guarantee that you only get a-z?

For fun we will be calling our new user Räksmörgås, why is that? Well it is a swedish word containing all of our special characters. And I do like shrimp sandwish.

First we start with the really lazy approach:

Well that doesn’t really make me happy. I can’t visualize the word using what I got so I need to pick it up a notch. [Read more…]

Remove-ADUser -> Remove-ADObject

So I was spring cleaning a lot of disabled users from a customer Active Directory. After a while I noticed that I couldn’t remove all user account. Some just wouldn’t go away.

So what the.. [Read more…]

Different methods of removing user profiles

Sometimes I see people removing user profiles by just going into explorer. Going to the SystemDrive\Users folder, and using delete. Well this worked perfect on Windows 2003. But with upgrades to the profiling system with Windows 2008 and later this is a really bad idea.

There are 2 basic ways to remove user profiles in Windows today. And one for the special people.

[Read more…]

New-Password – Yet Another Password Function

So.

Here I was, a colleague posted a password generation script in his blog. So I read it and remembered my old password generation script. Even though I liked his script I felt that some parts of mine were more the way I like. But some parts like the possibility to add your own characters sets really make me wanna improve on my old script. So I rewrote parts of my script and you can download it here.

Some examples of the script in action:

 

 

How to remove extra spaces

Today I needed to clean up some input which contained superfluous spaces. So I wrote a small oneliner powershell, to easy my work.

[Read more…]