We help IT Professionals succeed at work.

Collect various logs

haz sh
haz sh asked
I have a script  to collect logs. I want to collect more files residing at a different file location.I am using $logpath as a variable. Can anyone guide please.

$Logshare = "\\share\CMLogShare\"
#Get path for SCCM client Log files
$Logpath = Get-ItemProperty -path "C:\Windows\CCM\Logs"
$Log = $logpath

#Create folders
New-Item -Path $env:temp\SCCMLogs -ItemType Directory -Force
Copy-item -path $log\* -destination $env:temp\Sccmlogs -Force
Watch Question

System Administrator
Figured it out