Nagios Exchange Nagios Exchange
  • Home
  • Directory
  • Library
  • Support
  • About

Advanced Search

Build precise queries to find exactly what you need

Search Logic

Select compatible versions

Press ESC to close

Sign In Sign Up
  • Home
  • Directory
  • Library
  • Support
  • About
Plugins4387Themes and Skins11Add-ons734Documentation283Graphics and Logos36View All Categories
LinuxSecuritySNMPFile SystemCloud
New Listings Recently Updated Listings Most Favored Listings Most Popular Listings Most Rated Listings Most Reviewed Listings
Random Project
* Remote Check Tunneling check_network_device_ping
0.0 (0)
7.9K
RSS Feed
Newest Listings Updated Listings
Top Contributors
LAMY (6)Julien DESMAREST (6)deskwork_itunes142 (4)Davide Lemma (4)Joerg Hoerter (3)
See More
Newest Contributors
Guillaume8723 (1)Salvo (1)SOHA-IT (1)Tsvetomir Tsvetanov (1)Igor Ru (1)
See More

Copyright © 2009-2025 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home > Carl Schulz
CS

Carl Schulz

@carlschulz

User Stats

Member Since: June 5, 2014

Favorites0

Views

Projects0

No Projects Found
Check Active Directory Accounts

Nice script some small improvements needed

This useful script gives good control on the state of your AD accounts. I wanted to show a Warning at 1 and Critical at 2 or more errors, ran into a problem with the script. Solution: returning 0 or one element in an array results in a different return variable not supporting the .Count property change the invoke-expression line to $result=@(invoke-expression -Command "$command" -OutBuffer 1000) to correctly process the return value of the script in the NSClient++ call of the powershell script and pass it on we need to use exit $lastexitcode otherwise we are passing on the success of powershell not the return value of the script itself. So the NSClient++ ini file needs to contain lines like this: check_ps_lotp_check_ad_account_disabled=cmd /c echo scriptslotp_check_ad_accounts.ps1 AccountDisabled "cn=AAA,dc=BBB,dc=com" Subtree 0 1; exit $lastexitcode | powershell.exe -noprofile -executionpolicy bypass -command - cn= evaluation is not evaluated by the script, some changes are needed there too or just hardcode the SearchBase variable That's it!

Reviewed 11 years ago

No Favorites Found

Copyright © 2009-2025 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile