What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags

View all Tags

locked out users notification



Your Vote:



i need your help guys.

Import-Module ActiveDirectory

$server=Search-ADAccount -Server [IP] -LockedOut -UsersOnly | select SamAccountName, Name
if ($server.count -eq $null -and $server -eq $null){
Elseif ($server.count -eq $null -and $server -ne $null){
    [email protected]($server.count)
Write-Host "<prtg>"
Write-Host "<result>" 
"<channel>Locked Out Users</channel>" 
"<value>"+ $a +"</value>" 
"<text>" + (($server | select SamAccountName, Name | ConvertTo-Csv -NoTypeInformation | select -skip 1 ) -join ", ").replace("""","") + "</text>"
Write-Host "</prtg>"

i can see the UserName und Name in my E-Mail notification if a User locked out. But i can't see the Username if a User not more locked.

account-locked-out notifications script

Created on Feb 9, 2021 11:01:09 AM by  ikedicke (0) 1

Last change on Feb 9, 2021 11:54:04 AM by  Felix Wiesneth [Paessler Support]


Nobody has replied yet

Why not be the first?

Please log in or register to enter your reply.

Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.