Name Your Powershell Parameters

Shane O’Neill warns us to name our Powershell parameters:

Eh…what?

Cannot process argument because the value of argument “path” is null.

The “path” argument is NULL? And I’m back to the very root of “I:\”?

Thankfully, at this stage, I know to go back and read the help file again before I let slip any curses.

As usual, it’s a fun read and a good lesson.

Related Posts

Checking If Ports Are Open Using Powershell

Anthony Nocentino has a quick Powershell script to see if ports are open on a machine: Ever want to confirm that a port is accessible from one computer to another? There’s a PowerShell cmdlet for that, Test-NetConnection. With the -Port option, this cmdlet will do a quick TCP three-way handshake on the remote system to confirm that the service is […]

Read More

More dbatools Changes

Chrissy LeMaire has a few more breaking changes for us: It’s been a busy couple days! Here’s a list of our breaking changes Invoke-Sqlcmd2 has been removed and replaced with a warning to use Invoke-DbaQuery The NetworkShare parameter has been renamed to SharedPath UseLastBackups has been renamed to UseLastBackup There are also several new commands […]

Read More

Categories

September 2017
MTWTFSS
« Aug Oct »
 123
45678910
11121314151617
18192021222324
252627282930