Batch scripting is not dead

There’s still a little place in my heart for a decent batch script. This morsel prompts the user to enter a new computer name and then, using NETDOM, it renames the computer on the domain securely prompting for the password of an account with the required privileges. Use it in a deployment if you aren’t able or willing to use WDS’ built-in Client Naming Policy and prefer not to end up with PC-RT4T5FGR8HY or something equally ridiculous.

I’d love to see a PowerShell example that queries a bespoke database for a unique computer name, applies it to the computer and marks it as used in the database – a little project perhaps…?


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">