Whenever someone logs on with invalid credentials, there will be a log entry in the security log. Here is a function that can read these events from...
database-tools
Categories
- Free tools
- SQL Admin Toolset
- SQL Compliance Manager
- SQL Defrag Manager
- SQL Diagnostic Manager for MySQL
- SQL Diagnostic Manager for SQL Server
- SQL Diagnostic Manager Pro
- SQL Doctor
- SQL Enterprise Job Manager
- SQL Inventory Manager
- SQL Query Tuner for SQL Server
- SQL Safe Backup
- SQL Secure
- SQL Workload Analysis for SQL Server
- Uptime Infrastructure Monitor Formerly Uptime
Percentage Of Full Table Scans.
We are hitting over 50% on our master database for full table scans. Would queries like this: SELECT DATE_FORMAT(now(),'%Y%m%d') as today,...
Change Desktop Wallpaper
To change the current desktop wallpaper and make this change effective immediately, PowerShell can tap into the windows API calls. Here is a...
Getting System Information for Remote Systems
In a previous tip you learned how systeminfo.exe can compose a rich system profile. systeminfo.exe has built-in remoting capabilities, so provided...
Using Block Comment in the ISE Editor
There is a little known trick that you can use to block-prepend or block-remove characters in the ISE editor. This feature was introduced in...
Getting System Information
PowerShell plays friendly with existing console applications. One of the most useful is systeminfo.exe which gathers all kinds of useful system...
Starting Services Remotely
Since Start-Service has no -ComputerName parameter, you cannot use it easily to remotely start a service. While you could run Start-Service within a...
Using ICACLS to Secure Folders
Console applications are equal citizens in the PowerShell ecosystem. In this example, a function uses icacls.exe to secure a newly created folder:...
Lowering PowerShell Process Priority
When you run a PowerShell task, by default it has normal priority, and if the things your script does are CPU intensive, the overall performance of...
PowerShell Remoting with Large Token Size
The Kerberos token size depends on the number of group memberships. In some corporate environments with heavy use of group memberships, the token...
Getting Most Recent Earthquakes
Everything is connected these days. PowerShell can retrieve public data from web services. So here's a one-liner that gets you a list of the...
Getting Error Events from Multiple Event Logs
Get-EventLog can read events only from one event log at a time. If you want to find events in multiple event logs, you can append array information,...
Ordered Hash Tables and Changing Order
Ordered hash tables are new in PowerShell 3.0 and great for creating new objects. Unlike regular hash tables, ordered hash tables keep the order in...
Getting Yesterday’s Date – at Midnight!
Getting relative dates (like yesterday or one week ahead) is easy once you know the Add…() methods every DateTime object supports. This would...
Search and View PowerShell Videos
PowerShell is amazing. It will let you search YouTube videos for keywords you select, then offer the videos to you, and upon selection play the...
Managing Windows Defender in Windows 8.1
Windows 8.1 ships with a new module called "Defender". The cmdlets found inside enable you to manage, view and change all aspects of the...
Searching for Local User Accounts
Did you know that you can actually search for local user accounts, much like you can search for domain accounts? Here is an example code that...
Getting Local Group Members
In PowerShell, local accounts and groups can be managed in an object-oriented way thanks to .NET Framework 3.51 and above. This will list local...
Exchanging CMD.EXE with POWERSHELL.EXE in Windows 8.1
Windows 8.1 still offers the old cmd.exe command window in some of its context menus. To change that and replace cmd.exe with powershell.exe, in...
Managing Office365 with PowerShell
Did you know that you can manage your Office365 accounts with PowerShell, too? Provided you have an Office365 account, try this: $OfficeSession =...
Displaying Path Environment Variables
The environment variable $env:Path lists all paths that are included in the Windows search path when you launch an application. Likewise,...
Finding Disk Partition Details
To view disk partitioning information, use WMI: Get-WmiObject -Class Win32_DiskPartition | Select-Object -Property * Next, pick the properties you...
Setting Default Email Address for AD Users
Scripting Active Directory does not necessarily require additional modules. With simple .NET Framework methods, you can achieve amazing things. In...
Use a Lock Screen
With WPF, PowerShell can create windows in just a couple of lines of code. Here's a funny example of a transparent screen overlay. You can call...
Creating Temporary Password
Here's a chunk of code that creates random passwords of different lengths for you: $length = 8 $characters = [Char[]]((31..50) + (65..90) +...
Obfuscating Credentials
How can you securely embed confidential passwords in a PowerShell script? You can't. But you can make it harder for people to discover the...
Create a Folder Selector
To add a little glamour to your scripts, here are a few lines of code that display a folder selector dialog. When a user selects a folder, your...
Getting Folders by Prefix
Did you know that Group-Object can easily group elements by custom criteria? Here's a line that groups folders by their first three letters:...
Finding Known USB Drives
Did you know that Windows maintains a list of all USB storage devices ever hooked up to your machine? And it's simple to dump that list: $Path =...
Getting DLL File Version Info
Ever needed a list of DLL files and their versions? Get-ChildItem can get this information for you. You just need to unpack some properties like so:...