add no machine account option

This commit is contained in:
qgarnier 2017-09-07 15:16:51 +02:00
parent b9a6c327d5
commit aefb37ec27

View File

@ -37,17 +37,18 @@ sub new {
$self->{version} = '1.0'; $self->{version} = '1.0';
$options{options}->add_options(arguments => $options{options}->add_options(arguments =>
{ {
"config:s" => { name => 'config', }, "config:s" => { name => 'config' },
"language:s" => { name => 'language', default => 'en' }, "language:s" => { name => 'language', default => 'en' },
"dfsr" => { name => 'dfsr', }, "dfsr" => { name => 'dfsr' },
"noeventlog" => { name => 'noeventlog', }, "noeventlog" => { name => 'noeventlog' },
"timeout:s" => { name => 'timeout', default => 30 }, "nomachineaccount" => { name => 'nomachineaccount' },
"timeout:s" => { name => 'timeout', default => 30 },
}); });
$self->{os_is2003} = 0; $self->{os_is2003} = 0;
$self->{os_is2008} = 0; $self->{os_is2008} = 0;
$self->{os_is2012} = 0; $self->{os_is2012} = 0;
$self->{msg} = {global => undef, ok => undef, warning => undef, critical => undef}; $self->{msg} = { global => undef, ok => undef, warning => undef, critical => undef };
return $self; return $self;
} }
@ -132,7 +133,8 @@ sub load_xml {
sub dcdiag { sub dcdiag {
my ($self, %options) = @_; my ($self, %options) = @_;
my $dcdiag_cmd = 'dcdiag /test:services /test:replications /test:advertising /test:fsmocheck /test:ridmanager /test:machineaccount'; my $dcdiag_cmd = 'dcdiag /test:services /test:replications /test:advertising /test:fsmocheck /test:ridmanager';
$dcdiag_cmd .= ' /test:machineaccount' if (!defined($self->{option_results}->{machineaccount}));
$dcdiag_cmd .= ' /test:frssysvol' if ($self->{os_is2003} == 1); $dcdiag_cmd .= ' /test:frssysvol' if ($self->{os_is2003} == 1);
$dcdiag_cmd .= ' /test:sysvolcheck' if ($self->{os_is2008} == 1 || $self->{os_is2012} == 1); $dcdiag_cmd .= ' /test:sysvolcheck' if ($self->{os_is2008} == 1 || $self->{os_is2012} == 1);
@ -214,10 +216,14 @@ Specifies that SysVol replication uses DFS instead of FRS (Windows 2008 or later
Don't run the dc tests kccevent, frsevent and dfsrevent Don't run the dc tests kccevent, frsevent and dfsrevent
=item B<--nomachineaccount>
Don't run the dc tests machineaccount
=item B<--timeout> =item B<--timeout>
Set timeout time for command execution (Default: 30 sec) Set timeout time for command execution (Default: 30 sec)
=back =back
=cut =cut