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 The script: #Imports the Active Directory module Import-Module active* #Asks the user for a filename $photopath = Read-Host “Please input filepath and filename” #Converts the users input to an object $file = Get-Item “$photopath” #Calculates the filesize $filesize = $file.length/1KB #If the file is largers than 12KB you get a message stating that the file is too large #If the file is smaller than 12KB it asks for a username and imports the file to Active…
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. The domain is called test.local and have 5 OUs in addition to the default ones, those are: Sales Management HR IT groups Files are stored on a drive called e: under a folder named users. Each homefolder is shared with a trailing $. In the OU called groups, there are a few groups with identical names to the rest of our OUs. Now that we have…