PowerShell script for domain join remotely

Hi Friends

Hope you all are enjoying life at the fullest at the time while this post reached you. I am going to use this post to compile some handy scripts which may be used by admins in day to day activities. This is first tool in the series.

Information about this tool (not tested)

I have used “Computer name” parameter in this script so you have to make it sure that computer name should be resolved. You can use any mechanism for it (DNS,NETBios). Other consideration is that since .ps1 files are not allowed to upload here so have pasted script in word file. You need to download the file and do copy-paste of content in ISE and the save file as .ps1.

This script supports adding multiple computers remotely to domain. Help file is also been added in script. I have converted script  to function so to test call function at the end by typing function name or to use directly delete the first line of script(Function Add-Domain {) and last line of script (}).

Note : Primary use of this script is for testing and training.


You can use download link above to download the script file.

So that’s all in this post. See you soon with some other technical stuff. By then take good care of yourself. Bye.

DNS Application Partition Contents using Powershell

Hi Friends

I hope this post finds you in good health and spirit. I was busy in some powershell assignment recently, and it gave me good idea to see content of application partition using “powershell eye”. Its lazy night here at Infy Mysore center so thought to use my time meaningfully. And here we begin.

Powershell capabilities can be extended using modules. There is a module for AD too so you need to import it. Use Import-module cmdlet for it.


It will create PSDrive for AD. PSDrive can be considered as data drive like regular drives (C:,D: etc.) but these drives exist only inside powershell. You can’t see them in windows explorer.  So, don’t try to find them there.

Once you have this drive you can uses regular “dir” and “cd” commands to browse data. So start by  changing drive to  AD drive and start browsing.

So here is what inside “ForestDNSZone”. This replicates in whole forest and remember you need to use “cd” to change directory and “dir” to see contents.



and this is what you have in “DomainDNSZone”.


So, isn’t it simple. By the way you have you seen ObjectClass of Zone and records. If not go up and check it again.

So, that’s all in this blog. See you again with some other technical stuff. But not before Sunday, “IPL FINAL “.

By then take good care for yourself.