Summary: Easily find references to uninitialized variables in Windows PowerShell.
My extremely long script keeps failing and I suspect it may be because of variables that are not
initialized prior to being used. How can I find uninitialized variables?
Use the Set-StrictMode cmdlet and set it to –version 1 to ensure that all references to
initialized variables generate an error:
Set-StrictMode –version 1