All Apps and Add-ons

ad-repl-stat.ps1 error ?

sieutruc
Contributor

Hello,

When i run ad-repl-stat.ps1, i got an error like:

Missing closing ')' in expression.
At C:\script\ad-repl-stat.ps1:18 char:3
+         [ <<<< ValidateNotNullOrEmpty()]

Can you show me why it likes that ?

0 Karma

ahall_splunk
Splunk Employee
Splunk Employee

Please provide more information. we need, at a minimum:

1) What OS is the Splunk Universal Forwarder running on?
2) What version of Splunk is installed?
3) How are you running the script?

Thanks,

sieutruc
Contributor

thanks for your information

0 Karma

ahall_splunk
Splunk Employee
Splunk Employee

(Since I have been replying all along, I'll complete this one)

I have not looked at Windows Server 2000. The methodologies we use are to look at what is required (the site, for instance) and then look at documentation to determine how we can get it in a particular OS. However, in the case of Windows Server 2000, the information was not necessarily easily obtainable. I don't know how to access that data on that OS.

0 Karma

sieutruc
Contributor

$SiteName = $WMI_DOMAIN.ClientSiteName
$WMI_DOMAIN.Status
and for 2 properties, do you know how to get them in another way ? (vbscript, command line..)

0 Karma

ahall_splunk
Splunk Employee
Splunk Employee

The syntax of Powershell v1.0 is different, so you will have to re-write the script. In practice, the level of detail for replication is not available from Windows Server 2000, so you may just want to forego the information and disable the input.

0 Karma

sieutruc
Contributor

yes i know, i just want to know how to run on powershell v1.0, not powershell v2.0 to execute ad-repl-stat.ps1.

0 Karma

ahall_splunk
Splunk Employee
Splunk Employee

The Splunk App for Active Directory does not support Windows Server 2000.

0 Karma

sieutruc
Contributor

Second,WMI_NTdomain isn't existed on windows 2000. But in your script, you just only use:
$DomainNetBIOSName = $WMI_DOMAIN.DomainName
$SiteName = $WMI_DOMAIN.ClientSiteName
$WMI_DOMAIN.Status
$DomainNetBIOSName can be obtained by using vbscript. but site name and ojbect status , i don't know how to get them without using WMI_NTdomain class.
That's all my problems, Do you have any suggestion to me for solving those problems ?

0 Karma

sieutruc
Contributor

I can do what you say.In fact, i want to use powershell v1.0 because, i installed it on my system which are based on windows 2000.
For the dnsserver scripts, they are running well.
However in domain controller,there are only 2 problems. The first issue that i get stuck in running is ad-repl-stat.ps1.

0 Karma

ahall_splunk
Splunk Employee
Splunk Employee

Yes - from the documentation at http://docs.splunk.com/Documentation/ActiveDirectory/latest/DeployAD/Platformandhardwarerequirements, the TA supports:

Windows Server 2003 (with SP2 or later) or Server 2003 R2 (with SP1 or later) with PowerShell 2.0 or later

Basically, Powershell v1.0 is not supported. You should install Powershell v2.0. What you are running into is a Powershell syntax bug because of an old version of Powershell.

0 Karma

sieutruc
Contributor

My machine is :
.net Framwork 2.0
Powershell v1.0
Windows 2003 x86
I run it directly on command line by:
./ad-repl-stat.ps1 (error)
The 2 remaining don't have any problem.
i test it on another machine with powershell v1.0 , it got error too. Can you suggest what i should do ?

0 Karma
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...