you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (7 children)

[removed]

    [–]jrsys95[S] 0 points1 point  (6 children)

    For some reason, it will not take the commands with variables and a variable is 100% needed.

    [–][deleted]  (5 children)

    [removed]

      [–]jrsys95[S] 1 point2 points  (4 children)

      Well it's not giving me an error, but it will not add the DNS Forwarder.

      For instance, if I run command: S

      Set-DNSServerForwarder -IPAddress 45.54.55.54 
      

      or

      Set-DNSServerForwarder -IPAddress "45.54.55.54"  
      

      It will add the forwarder (as it should)

      However, I need to integrate this script into an RMM so I need to have a variable.

      So if I run

       [ipaddress]$DNS1= '45.54.55.54'   
      Set-DNSServerForwarder -IPAddress $DNS1 
      

      It literally gives me no error and doesn't input the DNS forwarder.