Over time I’ve learned to write my scripts better. I try to follow best practices, at least as far as I can allow myself. One such best practice is capitalization
Category: Uncategorized
Null. Empty. Space? How to Detect?Null. Empty. Space? How to Detect?
** Disclaimer ** I do not know everything about PowerShell and I am sure I will miss some methods of detection of empty values. However, what follows is based on
Output Files – Keep Track!Output Files – Keep Track!
Output files from scripts can be useful for assessments, tracking changes, documenting settings and more. These files may be named in such a way that it is understandable to you,
PowerShell, Delimiters and Building CSVsPowerShell, Delimiters and Building CSVs
Handling your PowerShell scripts output is pretty important. The output files could be used for reporting, documentation or just general knowledge gathering purposes. Like all data outputs, garbage in does
Get Out! (-GridView)Get Out! (-GridView)
One of the more interesting cmdlets that was pointed out to me recently is Out-GridView. I found that for a script I wrote, being able to visually display choices and
What to do without -WhatIf?What to do without -WhatIf?
Imagine you are testing out a new script and you find a cmdlet that does not have a ‘-WhatIf’ switch available as an option. What can you do? Not much
Documentation Script TipDocumentation Script Tip
** Note ** Apologies for the late post, was working on getting one book out and just finished up the technical material for another book. ** End Note ** When
Joining Lines with PowerShellJoining Lines with PowerShell
The ability to join multiple lines or multiple variables into one line or one variable can prove quite useful when working with certain data sets. Example #1 For this example,
Drop Folder PowerShellDrop Folder PowerShell
Drop folders can be used for a lot of things. Files placed in these folders can be processed by PowerShell for whatever purpose they were defined for. Sample usages of
CIM to WMICIM to WMI
Years ago WMI was de-emphasized for CIM. Wait. Do you know what those are? CIM – “The Common Information Model (CIM) is an extensible, object-oriented data model that contains information