PowerShell function to determine if the committed bytes usage of a computer is high

PowerShell function to determine if the committed bytes usage of one or more computers is high.This is done by analyzing 2 specific performance counters and querying the amount of RAM the computer has installed. The committed bytes usage is considered high if the counter \Memory\Committed Bytes is higher than 80% of the counter \Memory\Commit Limit (if the amount of installed RAM is less than or equal to 8GB) or if the counter \Memory\Committed Bytes is higher than the counter \Memory\Commit Limit -2GB (if the amount of installed RAM is more then 8GB).

Read more

PowerShell function to determine if the processor usage of a computer is high

PowerShell function to determine if the processor usage of one or more computers is high. This is done by analyzing 3 specific performance counters. The processor usage is considered high if the counter \Processor(_Total)\% Processor Time is higher than 90 AND the counter \System\Context Switches/sec is higher than 20000 AND the counter \System\Processor Queue Length is higher than 2.

Read more

PowerShell GUI script to unlock an Active Directory user’s account

PowerShell GUI script to unlock an Active Directory user’s account. The script will need to be run from a computer which is part of the domain. It needs access to the ActiveDirectory PowerShell module. It will first try to load it locally, if not available it will setup a session to a Domain Controller and will import it from there (This requires that the user running this script needs appropriate rights to do so).

Read more

PowerShell GUI script to reset an Active Directory user’s password

PowerShell GUI script to reset an Active Directory user’s password. The script will need to be run from a computer which is part of the domain. It needs access to the ActiveDirectory PowerShell module. It will first try to load it locally, if not available it will setup a session to a Domain Controller and will import it from there (This requires that the user running this script needs appropriate rights to do so).

Read more

PowerShell function to find the location where an Active Directory user was locked out

In case an Active Directory user gets frequently locked out, you can use this PowerShell function to check on which computer the lockout occurs. It does so by querying the Security Event Logs of the Domain Controllers. Once you have determined on which computer the lockout occurs, you still need to find out what exactly is causing the account lockout. This can be a manual drive mapping, a service running under the user account, an ODBC connection, etc.

Read more

1 2 3 4