The purpose of this script is to unlock a file located on a shared folder. The server which hosting the shared folder is configured in the variable $nas_server This script works on Windows 2008/Windows 7 and uses the tool “openfiles.exe”
Move computer objects to another Active Directory OU
This script will be useful if you want to move computer objects in the Active Directory filtered by name to a destination OU Script : $computerstomove = Get-ADComputer -LDAPFilter “(name=Desktop00*)” -SearchBase “CN=computers,DC=domain,DC=local,DC=net” foreach ($computertomove in $computerstomove) { Move-ADObject $computertomove -TargetPath
Monitor the Software registry hive size + send report by email
Monitor locked out user accounts
Monitor if a process is frozen
Monitor certificate expiration
Monitor Active Directory database backup + report sent by email
Kill all instances of the same process name
This script kill all instances of the process “Robocopy” Script : (get-process |where {$_.processname -eq “Robocopy”}) | stop-process Reference : Using the Stop-Process Cmdlet Terminating a Process Syntax Stop-Process -name string[] [-passThru] [-Force] [-confirm] [-whatIf] [CommonParameters] Stop-Process [-id] Int32[] [-passThru]