How to pull files or folders


hey need sccm log files few hundred machines in few labs. have no idea how file , how store on computer.

get-childitem \\ceit2321104x*\c$\windows\temp\sccm_logs | sort-object length -descending

$outputfile = $env:userprofile + "\desktop\test.txt"      function get-autocad {    process {          get-childitem "\\ceit2321104x016\c$\windows\temp\sccm_logs" | {$_.attributes -eq 'directory'}            }  }            get-adcomputer -searchbase 'ou=ceit,ou=tsvc,ou=labs,ou=devices,dc=ad,dc=test,dc=edu' -filter {name -like 'ceit2322102' } | select-object -expandproperty name | get-autocad | out-file $outputfile      #-and name -like 'ceit2322103' -and name -like 'ceit2322120' -and name -like 'ceit2551202' , -like 'ceit2551204'

i've been messing around these , have had no luck far. pretty sure need use get-childitem , output somehow or set equal something. have little knowledge of powershell , appreciated.



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

some help on Event 540

WMI Repository 4GB limit - Win 2003 Ent Question

Event ID 1302 (error 1307) DFS replication service encountered an error while writing to the debug log file