Hi Experts,
I'm trying to run the script from here out of the box
https://gallery.technet.microsoft.com/Modify-DNS-Server-0ec651e7
BatchModifyDNSConfiguratio
n.ps1 -OU 'OU=FAKE GROUP, OU=FAKE,DC=DOMAIN,DC=com' –OldsDNS 192.168.9.9 –NewDNS 192.168.9.99
Get-ADComputer : An empty SearchBase is only supported while connected to a GlobalCatalog.
At C:\Users\olujan\Desktop\Ba
tchModifyD
NSConfigur
ation\Batc
hModifyDNS
Configurat
ion\BatchM
odifyDNSCo
nfiguratio
n.ps1:57 char:12
+ $Servers = Get-ADComputer -SearchBase "$DistName" -Filter "*" | ForEa ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~
~~~~~~~~~~
~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-ADComputer], ArgumentException
+ FullyQualifiedErrorId : ActiveDirectoryCmdlet:Syst
em.Argumen
tException
,Microsoft
.ActiveDir
ectory.Man
agement.Co
mmands.Get
ADComputer
I've tried with single and double quotes, re-order the switches... Feels like I'm making a rooking mistake. What am I doing wrong?
ASKER