on-internet
← Community

PowerShell output is crossing between functions

Stack Overflow ·

I am writing a PowerShell script in version 5.1 on Windows 10 that gets certain pieces of information about a local system ( and eventually its subnets ) and outputs them into a text file. At first, I had all of the aspects in a single function. I ran into output issues when outputting getUsersAndGroups and getRunningProcesses functions, where output from getUsersAndGroups would be injected into the output of getRunningProcesses. The two functions are: # Powershell script to get various properties and output to a text file Function getRunningProcesses() { # Running processes Write-Host "Runnin

Comments

Sign in or sign up to comment and upvote.

No comments yet.