I want to use a function to add an element to an array that was declared outside the function by calling the function. I’ve tried several approaches, however none effects the wanted effects, as shown below:
[EDIT: Image substituted by a text written as formatted code, with the directory credentials redacted]
Why are these results in the image happening and what can I do for having the effects I want? EDIT: Is there such a thing in PowerShell that an array doesn’t accept having equal values?
Please do not post images of code or console output. Instead post the plain text and format it as code.
To you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.