PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,329 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi All
i have hardware devices and i want to create DNS entries for it. i have more than 100 entries to be added. how can do i achieve using PowerShell. i have a csv file in the below format.
There's no error handling in this:
Import=CSV C:\Junk\NameAndAddress.csv |
ForEach-Object{
$a = $_.HostName -split "\.",2
Add-DnsServerResourceRecordA -Name $a[0] -ZoneName $a[1] -IPv4Address $_.IPv4Address
}
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more