Link to home
Start Free TrialLog in
Avatar of haz sh
haz sh

asked on

Collect various logs

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
Avatar of haz sh
haz sh

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial