database-tools

Ejecting CDs

PowerShell can still use COM libraries. Simply use New-Object -comObject and provide the COM library name to load it. With this approach, you can do...

PowerShell Essentials: Get-Member

Get-Member is the third important basic PowerShell cmdlet as it gives you a documentation of what a command returns. It lists all of the object and...

PowerShell Essentials: Get-Help

Get-Help is the second of the three most important PowerShell cmdlets as it retrieves all the Help for any cmdlet. If you just enter Get-Help, you...

PowerShell Essentials: Get-Command

There are only three cmdlets you should know by heart. One is the Get-Command, which can do a lot more than you might think. When called without...

Create PowerShell Shortcuts

If you ever wanted to create shortcut icons on your Desktop, or in your programs menu, to quickly launch PowerShell, here is a way to do it:...

Preserving Alias Definitions

Maybe you have invested some time in creating new aliases, and now you would like to know how to preserve your new aliases so that the next time you...

Deleting Aliases

As you may know aliases are shortcuts to other commands. So, you can easily add new aliases like this: Set-Alias edit notepad.exe The next time you...

Creating Text Files

PowerShell offers you a multitude of ways to write information to disk. Here's a quick overview. 1. You can use classic redirection:...

Auto-Documenting Script Variables

Ever wanted to get a sorted list of all variables used inside a script? Use this function: simply call Get-ScriptVariables and supply a path to your...

Encrypting Scripts With A Password

In a previous tip, you have learned how you can encrypt a PowerShell script using your identity as a secret key. You might prefer to use a...

Encrypting PowerShell Scripts

Sometimes, you may want to hide the code of your PowerShell script in order to protect passwords contained within the code. One way to safely...

Finding Out Whether A Web Page Is Open

The Shell.Application COM object returns a list of all open windows, including all opened IE browser windows. This way, you can find out whether a...

Accessing Internet Explorer

Accessing Internet Explorer can be useful for obtaining Web content. The usual approach uses a COM object called InternetExplorer.Application like...

Detect DHCP State

You can use WMI and Win32_NetworkAdapterConfiguration to determine whether a computer uses DHCP to acquire an IP address. Simply look for all...

Select Folder-Dialog

Want to provide your users with a neat dialog to select folders? Simply use a COM object called Shell.Application, which provides the...

Sending Simple SMTP Mail

You need to notify an admin that something happened or something is finished and would like to send a quick e-mail from inside your PowerShell...

Check Online Status

When managing more than just one system, you may want to remotely access those systems. Maybe you use WMI to do that. However, when you try and...

An Easy InputBox

All user input and output normally occurs inside the PowerShell console. Simply access the .NET framework directly if you'd like to get back the...

Finding Current Script Path

Ever wanted to locate the path of your current PowerShell script? This can be useful to call other scripts or resources in the same folder. To...

Finding Aliases for a Command

PowerShell defines a lot of shortcuts (aliases) for most commands. You may want to determine whether there is a shortcut if you find yourself using...

Clone NTFS Permissions

NTFS access permissions can be complex and tricky. To quickly assign NTFS permissions to a new folder, you can simply clone permissions from another...

Ldap Monitor

hello, I downloaded friday 20 mars “up-time5″ for test. when i try to use 'test ldap service instance', I have always error=53....

Finding and Deleting Orphaned Shares

Maybe you never noticed but when you delete folders that were shared on the network, the share may be left behind. To locate shares that have no...

Creating HTML Reports

PowerShell can convert objects into HTML using ConvertTo-HTML. By adding a bit of custom formatting, your reports can be colorful and cool. The...

Creating A Computer Profile

Often, information needed to comprehensively profile a computer comes from a number of sources. A great way to meld these different bits of...