Is more easy, if you have the right permission
$pc='remotepcname or ip address'
$user1="the user"
$UserDesktop = (Get-ChildItem -Path "\\$PC\c$\Users\$user1\Desktop").name | Sort-Object -Descending
Better
(Get-ChildItem -directory -Path "\\$PC\c$\Users").name | Sort-Object -Descending |
Foreach-object {
$user=$_
(Get-ChildItem -Path "\\$PC\c$\Users\$user\desktop").name |
Foreach-object {
"$pc $user $_"
}
}
Gastone Canali >http://www.armadillo.it
Se alcuni post rispondono al tuo quesito(non necessariamente i miei), ricorda di contrassegnarli come risposta e non dimenticare di contrassegnare anche i post utili. GRAZIE! Ricorda di dare un occhio ai link
Click Here andHere