Skip to main content

Posts

Showing posts from December, 2012

Transcripts : Leverage them

This post is a result of the query asked on the Facebook page of Bangalore PowerShell User Group . When someone asks a question regarding a Script, it becomes very difficult to follow through it especially if it  is related to some very different domain like SQL, SharePoint (especially for me). I personally feel one could attempt to even try answering the question if he knows what happens behind the scenes like the Verbose Output associated with the cmdlets one is executing and the type of Objects that are being emitted etc. Someone could ask the beginners to pipe the Objects into the Get-Member cmdlet to see the intricacies of the Object, or the Process one follows. Here we can leverage transcripts. Already transcripts are used by PowerShell Gurus in the presentations or trainings , so that later you can see them and find out what went in which order. In short Transcripts capture whatever appears in the PowerShell Console host. Note! Windows PowerShell ISE doesn't support t

ServerCore + Create Test Users using Facebook

So Recently my VHD got corrupted and had to make the VHD Boot again work. Thankfully I had all the PowerShell one-liners I used to get my Lab up in less time. First of all I will add 100 test users by following this awesome Hey Scripting Guys Blog Post . To make things a bit clear I am on a workstation with RSAT for Active Directory installed and my DC is a servercore machine. Just to give a hint when I need to run a cmdlet to get any information from the AD, I need to specify the name of the DC with -Server  parameter from where I want to get the information but a new connection will be opened and closed for each cmdlet invocation. For Example : Get-ADForest -Server dexservercore.dexter.com Better way explained in Active Directory PowerShell Blog is to map a PSDrive for better performance. Since I have only one DC in my test environment , when I Import the ActiveDirectory Module it will automatically map a PSDrive on my remote workstation. Now I don't want to a