Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Powershell Variables Query

$
0
0

OK,

So i have a path and would like all the folders/directories that are in that path to be set as variables.

This gives me the list i want... now how can i pass each of the lines after ---- to variables?

PS C:\windows\system32> get-childitem -Path c:\Users | Sort-Object Name | Format-Table Name

Name                                                                                                              
----                                                                                                              
Administrator                                                                                                     
admjl                                                                                                             
admjl.SOTON                                                                                                       
appdata                                                                                                           
jl2e09                                                                                                            
Public                                                                                                            
test                                                                                                              
wphg

Viewing all articles
Browse latest Browse all 15028

Trending Articles