Deploying DNS suffix to multiple machine.

Welcome Forums General PowerShell Q&A Deploying DNS suffix to multiple machine.

This topic contains 2 replies, has 3 voices, and was last updated by

4 months ago.

  • Author
  • #130680

    Points: 11
    Rank: Member

    hi there,

    A little background.

    i'm trying to deploy DNS suffix to multiple local servers (i'm working in an enterprise organisation) this testing environment is disconnected from the domain environment (we use AP configured as a DHCP and some swtiches).


    My goal is to deploy to 60 servers the DNS suffix, instead of login to each one and manually doing it.

    i successfully created a script to deploy it on one servers , the question is, what cmdlet i need to use in order to deploy this command to 60 servers.


    here i the cmdlet i use:(i'm running the script locally on the server and it works)...

    #Change adapter names:
    Rename-NetAdapter -name "Ethernet 2" -NewName "Black"
    Rename-NetAdapter -name "Ethernet" -NewName "Internal"

    $netadapter = Get-NetAdapter -Name Black

    #Change suffix list:
    Set-DnsClientGlobalSetting -SuffixSearchList @("" , "" , "" , "")

    Thank you for your support.

  • #131102

    Points: 1,375
    Helping Hand
    Rank: Community Hero

    You should take a look at Invoke-Command. Read the help including the examples and you will have an idea how to run commands remotely.

  • #131154

    Points: 1,347
    Helping Hand
    Rank: Community Hero

    There are plenty of sample script for this use case all over the web. Just use your post title to find them. Example:

    Change DNS ip addressess remotely on multiple computers

    Powershell: Change DNS ip addressess remotely on multiple computers

    Risk Management Statement:
    Never run any one else's code unless you know exactly what it is doing, no matter who / where you get it from.
    Initially only use sandboxed / test environments.

The topic ‘Deploying DNS suffix to multiple machine.’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort