Skip to main content

Posts

Showing posts from February, 2013

Use PowerShell to Create New AD Users using a Template

To use and existing account as a template to create new users one would use the good old "Active Directory Users and Computers" , right? by right-clicking on the User to be used as template and selecting "Copy" which will prompt something like below: But this blog is  meant for doing things using PowerShell. To quickly get me started I was tempted to use "Active Directory Administrative Center" on Server 2012, so that I could see the PowerShell history for the my actions( Yeah! you can do that now !!) but there was no method to do that in AD Admin Center :O , See below   The User "Dexter POSH" is the member of the group "RemotePOSHAdmins" under the OU "POSHAdmins" in my domain. I want to add a new User here using the dexterposh user account as the template. At first I thought of simply getting the User information using Get-ADUser and piping it into New-ADUser cmdlet (because it accepts pipeline input of type &q

Winter Scripting Camp 2013 - #1 Advanced Problem

First a bit background on the Winter Scripting Camp , this is the first time a Scripting camp is happening. The sole purpose of this is to make the scripters all over the world sharpen their skills for the upcoming "Scripting Games 2013". These games are awesome..so much stuff to learn and personally what I like about them are they are very practical and work-oriented whatever the problems asked are very real-life PRODUCTION environment problems. This develops your approach towards the problems which you might face later in your Work Environment. I learned a whole lot of lessons while participating for last year's Scripting Games in Beginner's category. Hopefully, the Scripting Camp will make me a bit sharper this time :P Following is the first problem of the Winter Scripting Camp...See how practical the problem is :P #1 Advanced Section Sizing up the Disks You have been asked to create a Windows PowerShell advanced function named Get-DiskSizeInfo. It must a