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 he confirmed that the script worked as planned I decided to make a function of it (Yes, I know it has been a lot of them on this blog lately)....

September 13, 2012 · nerenther

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 filesize to prevent users adding large photos (you can of course change this limit). The requirements for this script is the Active Directory module and permission to edit a user object in Active Directory...

August 16, 2012 · nerenther

Mass import of users in Active Directory v2 – Powershell time

Earlier I posted a script that created users and homefolders and added the users to specified groups. It also set ntfs permissions on the homefolders. That script used primarily old fashioned stuff, so I sat down and started looking for a neat way to do the same in powershell. The powershell script I came up does a lot more than the last one. Here a little list: Creates OUs Creates users Creates security groups Creates distribution groups Creates mailboxes for all users Add specified users to the correct security and distribution groups Creates a homefolder root folder and shares it Creates a homefolder for each user and sets ntfs permissions Set storage limit on the exchange mailbox database As you can see, it does quite a lot....

October 27, 2011 · nerenther

Mass import of users in Active Directory

Tried sleeping……That obviously didn’t work out, so here’s a guide on how to import a number of users in Active Directory and then creating and sharing out their home folder. Note: This guide uses dsadd for creating users and cacls for setting ntfs permissions. Thats kind of old fashioned, I will try to write a new guide using powershell later on. In the scenario I have created this script for we have a domain controller who happens to also be the file server, file01....

September 6, 2011 · nerenther

Activesync issue on Exchange 2010

At work we are currently migrating to a new active directory domain. The migration hos gone rather smoothly except for a couple of users who are not able to sync mail on their phones. After a little research I found the following events in the event log on our exchange CAS server: Log Name: Application Source: MSExchange ActiveSync Date: 04.08.2011 11:00:48 Event ID: 1053 Task Category: Configuration Level: Error Keywords: Classic...

August 4, 2011 · nerenther

ALTools from Microsoft, awesome!

Stumbled upon a tool from Microsoft called ALTools that I thought were absolutely awesome. It’s over 7 years old so I wonder why I haven’t seen it before Nevertheless it’s as cool now as it was when it was released. ALTools consists of several tools, but the coolest of them are: aloinfo – Displays all user account names and the age of their passwords eventcombMT – Gathers specific events from event logs of several different machines and saves them in a text file LockoutStatus – Shows a list of all domain controllers in a given domain and the lockoutstatus of a given user on those I have used eventcomb a couple of times as it has some predefined searches, for example Account Lockouts....

June 9, 2011 · nerenther