Skip to content

Concatenating computernames instead of adding to array #1

@gsneijd

Description

@gsneijd

Hello,

Thank you for this great script. i am a newcomer to powershell, so it helped me a lot.
i had a problem executing the script with more than one computer. the script concatenated the names instead of adding computers to the array. It looked something like comp1comp2comp3 :=

I added

# Define the livepc Arraylist
$livePCs = [System.Collections.ArrayList]@()

before the first foreach and it worked for me.

Gerald

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions