If your script requires external binary resources such as picture files or DLLs, you can of course ship them together with your script. You could,...
ps1
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
Using Awesome Export-Excel Cmdlet (Part 5)
This is part 5 of our mini-series about the awesome and free “ImportExcel” PowerShell module by Doug Finke. Make sure you install the module before...
Converting HTTP Response Codes
Checking Website Availability with a PowerShell Function In the previous example we created a small PowerShell function that checks web site...
Finding Hidden PowerShell Applications
The most widely known PowerShell hosts are certainly powershell.exe and powershell_ise.exe because they ship out-of-the-box. However, there can be...
Using Pop-up Dialogs that Are Always Visible
In the previous tip we used an old COM technique to display a pop-up box with a built-in timeout. That worked pretty well except that the dialog box...
Using Session Variables in Web Requests
Why Some Web Requests Fail in PowerShell but Work in a Browser Sometimes, web requests that work fine in a browser do not seem to work well in...
Using FileSystemWatcher Asynchronously
In the previous tip we looked at the FileSystemWatcher object and how it can monitor folders for changes. To not miss any changes, however, an...
Finding PowerShell Named Pipes
Each PowerShell host running PowerShell 5 or better opens a “named pipe” that you can detect. The code below identifies these named pipes and...
Using a Queue instead of a Recursion
Rather than calling functions recursively, you may at times want to use a Queue object that you can load with fresh tasks while you are unloading...
Locking the Screen with PowerShell
Here is a PowerShell function called Lock-Screen that can lock the screen and prohibit user interaction. There can be a custom message, and the...
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....
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...
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....
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...
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...
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....
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...
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...
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...
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...
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...
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>...
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...
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...
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...
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...
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...
Translating VBScript to PowerShell
Most old VBS scripts can be easily translated to PowerShell. The key command in VBS is “CreateObject” which lets you access system libraries....
Detecting WinPE
Running PowerShell in WinPE Environments PowerShell can run inside WinPE environments. If you’d like to detect whether your PowerShell script runs...