Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concatenating computernames instead of adding to array #1

Open
gsneijd opened this issue Mar 26, 2021 · 0 comments
Open

Concatenating computernames instead of adding to array #1

gsneijd opened this issue Mar 26, 2021 · 0 comments
Assignees

Comments

@gsneijd
Copy link

gsneijd commented Mar 26, 2021

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

@gsneijd gsneijd changed the title Bug with more than one computer Concatenating computernames instead of adding to array Mar 26, 2021
@signalwarrant signalwarrant self-assigned this Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants