I’ll explain what i want by example, not sure how to explain it another way.
Heres the code im using :
Get-WmiObject win32_share | select name, path
an example entry is from the above is:
name path
ADMIN$ C:\windows
C$ C:\
I want to put all names and paths into one variable. I want the string to look something like:
“Name: admin, path: C:\windows ; Name: c$, path: C:\ ; ect ect..”
Any ideas?
Something like this: