ApexSQL Audit Is Reaching End of Life — Here’s Your Next Step
Categories
- Free tools
- SQL Compliance Manager
- SQL Defrag Manager
- SQL Diagnostic Manager for MySQL
- SQL Diagnostic Manager for SQL Server
- SQL Diagnostic Manager Pro
- 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
Passing Arguments to Encoded Commands
Why Encode PowerShell Code? Encoding PowerShell code is a great way to run PowerShell code outside the PowerShell environment, i.e. in batch files. Here is some sample code that takes PowerShell code, encodes it, and shows how to run it with a console command:...
Deleting Registry Keys that can’t be Deleted
Why Some Registry Keys Can't Be Deleted in PowerShell Deleting registry keys is typically trivial and can be done with Remove-Item. However, every once in a while, you may come across registry keys that can’t be deleted. In this tip we’ll show an example, and provide...
Splitting Large Files in Smaller Parts (Part 1)
PowerShell can split large files in multiple smaller parts, for example to transfer them as email attachments. Today, we focus on splitting files. In our next tip, we show how you can join the parts back together. Splitting Large Files into Smaller Parts with...
Using Custom Prompts for Mandatory Parameters
How PowerShell Handles Mandatory Parameters When you define mandatory parameters in PowerShell, the user gets prompted for the value if it is missing. The prompt uses the parameter name only as you can see when you run this code: param ( [Parameter(Mandatory)]...
Calculating Most and Least Significant Byte
Numbers are stored internally as bytes. An Int32 value, for example, uses four bytes. Sometimes it is required to split up the number into its byte parts, for example, to calculate checksums with the least significant byte. Guide to Handling Numbers in Bytes We have...
Create ASCII Art
It’s amazing how versatile PowerShell is: with just a couple of lines of code, you can turn any photo and image into a piece of ASCII art. PowerShell simply loads the image, then scans it line by line and row by row, and replaces each pixel with an ASCII character,...
Verifying Local User Account Passwords
In the previous tip, we asked Active Directory to validate user account passwords. The same can be done with local accounts. Your PowerShell code can use local account passwords to manage access to scripts or partial script functionality. Of course, you could also use...
New VCL and FireMonkey Styles in RAD Studio 10.3.1
In today’s blog post, I wanted to highlight the 15 new custom VCL Windows and FireMonkey multi-device styles that we added to Delphi, C++Builder and RAD Studio 10.3.1. Many of the styles come in different color variants, and Bitmap Style Designer templates are also...
Converting Text to Image
What is WPF (Windows Presentation Foundation)? WPF (Windows Presentation Foundation) is not just a technique to create UIs. You can create any type of vector-based graphics composition and save it to a graphics file. Here is a simple example that takes any text and...
Removing Empty Array Elements (Part 1)
Occasionally you come across lists (arrays) with empty elements. What’s the best way of removing empty elements? Creating a Software Inventory Using the Registry Let’s first focus on a common use case: the code below creates a software inventory by reading the...
Removing BOM from the Unicode Files
Removing BOM from Unicode Text Files Using PowerShell BOM (Byte Order Mask) is a characteristic byte sequence used in some Unicode encoded text files. If you receive text files with BOM that need to be processed by systems not supporting BOM, here is a way how...
Get Text File Encoding
Ensuring Correct Text File Encoding in PowerShell Text files can be stored using different encodings, and to correctly reading them, you must specify the encoding. That’s why most cmdlets dealing with text file reading offer the -Encoding parameter (for example,...
SID of Current User
psconf.eu – PowerShell Conference EU 2019 – June 4-7, Hannover Germany – visit www.psconf.eu There aren’t too many trainings around for experienced PowerShell scripters where…
Finding Windows Universal Unique Identifier (UUID)
Every Windows installation has a unique UUID that you can use to distinguish machines. While computer names can change, the UUID won’t: PS> (Get-CimInstance -Class Win32_ComputerSystemProduct).UUID 4C4C4544-004C-4710-8051-C4C04F443732 Universal Unique Identifier...
Formatting Date and Time (with Culture)
In the previous tip we illustrated how Get-Date can take a format string and convert DateTime values to strings. The string conversion always uses your local language though. That might not always be what you need. Let’s check out the problem, and a solution for it:...
Sending PowerShell Results to PDF (Part 1)
Using Microsoft Print to PDF from PowerShell Windows 10 and Windows Server 2016 finally come with a built-in PDF printer called “Microsoft Print to PDF” that you can use from PowerShell to create PDF files. Run this to check your PDF printer: $printer = Get-Printer...
Using FileSystemWatcher Correctly (Part 2)
Understanding the FileSystemWatcher and Its Limitations In the previous tip we introduced the FileSystemWatcher and illustrated how it can miss filesystem changes when your handler code takes too long. How to Use FileSystemWatcher Correctly To use the...
Using FileSystemWatcher Correctly (Part 1)
A FileSystemWatcher can monitor a file or folder for changes, so your PowerShell code can immediately be notified when new files are copied to a folder, or when files are deleted or changed. Example of Synchronous Monitoring Often, you find example code for...
Using Solid Alternatives for $MyInvocation
Lines like $MyInvocation.MyCommand.Definition can be useful to determine the folder in which the current script is stored, i.e. to access other resources located in the same folder. Easier Alternatives Since PowerShell 3 However, ever since PowerShell 3, there have...
Using Custom Styles in RAD Studio 10.3
How to Customize Your UI with FireMonkey Styles in RAD Studio 10.3 It’s very easy to customize your user interface using FireMonkey styles in RAD Studio 10.3. We’ve added all of the premium styles to GetIt (Tools > GetIt Package Manager > Styles) in 10.3. This...