Using Pop-up Dialogs that Are Always Visible

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 can be covered under your PowerShell window at times. Keep PowerShell Dialog Boxes Always on Top With a little-known...

Using Pop-up Dialogs that Are Always Visible

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 PowerShell. For example, when you navigate to http://www.geocode.xyz/Bahnhofstrasse,Hannover?json=1 in a browser, you get...

Cloud Building Blocks and Layers

Cloud Building Blocks and Layers

Welcome back to our blog series, Solutions for the Cloud. Now that we’ve discussed three concepts of virtualization related to the cloud, we will cover the basics of cloud infrastructure including cloud building blocks and layers. The Two Building Blocks of Cloud...

How-To: Configuring Your RAD Server Instance

How-To: Configuring Your RAD Server Instance

This guide is a full reference for configuring your RAD Server instance. It was written by Eli M. and is part of the collection of New RAD Server (EMS) Articles, Resources, and eBook. How-To: Configuring Your RAD Server Instance RAD Server is a turn-key application...

Using Pop-up Dialogs that Are Always Visible

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 asynchronous approach is required which looks like this: $FileSystemWatcher = New-Object System.IO.FileSystemWatcher...

Using Pop-up Dialogs that Are Always Visible

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 returns the processes exposing the pipes: Get-ChildItem -Path "\\.\pipe\" -Filter '*pshost*' | ForEach-Object { Get-Process...

Using Pop-up Dialogs that Are Always Visible

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 things that you have already processed. Searching a Filesystem Without Recursion Lee Holmes has recently posted the below...

Using Pop-up Dialogs that Are Always Visible

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 screen can be dimmed during lockout. Here is an example call: PS> Lock-Screen -LockSeconds 4 -DimScreen -Title 'Go away...

The Impact of Cloud on DBA

The Impact of Cloud on DBA

The DBA is the information technology professional responsible for ensuring the ongoing operational functionality and efficiency of an organization’s databases and the applications that access those databases. Traditionally, the job has entailed becoming an...

Using Pop-up Dialogs that Are Always Visible

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:...

Using Pop-up Dialogs that Are Always Visible

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...

Using Pop-up Dialogs that Are Always Visible

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 Pop-up Dialogs that Are Always Visible

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)]...

Using Pop-up Dialogs that Are Always Visible

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...

Using Pop-up Dialogs that Are Always Visible

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,...

Using Pop-up Dialogs that Are Always Visible

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...

Using Pop-up Dialogs that Are Always Visible

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...

1 5 6 7 8 9 16