About
Pricing
Community
Teams
Start Free Trial
Log in
haz sh
asked on
3/16/2020
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
Powershell
Scripting Languages
1
1
Last Comment
haz sh
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
haz sh
3/16/2020
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23