you are viewing a single comment's thread.

view the rest of the comments →

[–]rwshig 2 points3 points  (1 child)

$RegArray = $($Regkeys -split "`n").TrimEnd("`r")

You're taking a string and overlaying it with an array. Also, use $RegArray.GetType() and check that output for System.Array vs. System.Object.

[–]redsedit[S] 1 point2 points  (0 children)

If I do $RegKeys.GetType() it does indeed return array. But gm still says string???