database-tools

Keeping Track of Script Execution

Here is a chunk of code that demonstrates how you can store private settings in the Windows Registry: # store settings here $Path =...

Retrieving Outlook Calendar Entries

If you use Outlook to organize your calendar events, here is a useful PowerShell function that connects to Outlook and dumps your calendar entries:...

Improving Group-Object

In the previous tip we explained what Group-Object can do for you, and how awesome it is. Unfortunately, Group-Object does not scale well. When you...

Discover Group-Object

Group-Object is an awesome cmdlet: it can easily visualize distributions. Check out the examples below: Get-Process | Group-Object -Property Company...

Automating “Live” Websites

Occasionally, there is the need to automate tasks on websites that have been opened manually. Maybe you need to log into internal web pages first...

Installing Printers

Starting with Windows 8 and Server 2012 R2, these operating systems ship a PowerShell module called PrintManagement. The cmdlets found in this...

Using CSV to Create Objects

Sometimes it may be clever to use simple text-based CSV format internally to bulk-create objects, especially if the original data is already...

Backing Up All Scripts to ZIP

PowerShell 5 finally includes support for ZIP files, so if you want to backup all of your PowerShell scripts into one ZIP file, here is a one-liner:...

Running PowerShell Code as Someone Else

Local admin privileges are extremely powerful, and you should use techniques such as JEA to minimize the number of local Admins as much as you can....

Hardening Script Block Logging

By default, script block logging data is open to anyone, not just Administrators. When script block logging is enabled, any user can access the log...

Enabling Script Block Logging

In the previous tips, we took a deep look at how PowerShell 5 script block logging works: in a nutshell, when enabled, all PowerShell code that...

Finding Secret Passwords in Memory

Some scripts may leave variables with sensitive information behind. This can happen by accident, when the global scope is used, or when users call...

Outputting Data to HTML Reports

Here is a super easy and useful PowerShell function called Out-HTML: function Out-HTML { param ( [String] $Path = "$env:temp\report$(Get-Date...

1 50 51 52 53 54 159