These files contain functions. For example, Invoke-Sqlcmd2.ps1 contains the Invoke-Sqlcmd2 function. #Download and unblock the file(s). #Dot source the file(s) as appropriate. .
When you first start writing scripts, modularity, reusability, and best practices may not be top of mind. As your scripts become more complex, however, creating reusable elements becomes essential. By ...
If you've been building PowerShell scripts for a while now you've surely came across instances where you need to reuse a particular snippet of code. Rather than copying and pasting that snippet of ...
Over the last few years, I have created a vast library of PowerShell scripts that I use to keep my servers healthy. These scripts do everything from monitoring disk health to helping me to reclaim ...
To avoid errors, it's important to write PowerShell scripts that prevent code from running on an unintended platform. Luckily, this is easier to do than it sounds. Up until a few years ago, PowerShell ...