I removed lines within the New-Object PsObject -Property @{ ….. the culprit was the loginName line.
I have another .ps1 that references it's own $loginName variable. Could that have been gumming up the works?
When I close and reopen the ISE. It works.
↧
Reply To: Help Simplifying Code
↧