Copy to App data All users

I wanted to copy a config file which sits in the roaming app data of a user profile.I could do this with group policy but wanted to do this as part of the SCCM install .

Using PowerShell i was able to do this with the * parameter

$Source = “$PSScriptRoot\The folder that needs copying”
$Destination = ‘C:\users\*\AppData\Roaming\’
Get-ChildItem $Destination | ForEach-Object {Copy-Item -Path $Source -Destination $_ -Force -Recurse}
New-Item ‘HKLM:\System\SCCMApps\What ever you want to use for detection’ -Force | New-ItemProperty -Name Version1.0 -Value 1 -Force | Out-Null

I have also added a reg key for my detection method as the is more reliable than using the folder in app data

Capture.JPG

Capture2.JPG

 

0x87D0070C(-2016409844) Windows Upgrade Failed

When upgrading some clients i came across the following error when using the Windows servicing function. The was mostly an issue with remote users.

ERROR CODE 0x87D0070C(-2016409844)maximum run time.JPG

The error code basically means the upgrade timed out. This would not only apply to upgrade ( servicing ) but also updates.

This can be fixed by changing the maximum run time.

Software Library >Windows 10 Servicing >All Windows Updates and selecting the Feature update.

Capture1.JPG

or of updates

Software Library > Software Updates > All Software Updates and select the update with the error.

Capture1.JPG