Hello world!
ConfigMgr - Current Branch ServiceConnectionTool/ Upgrade Content Validation Offline
Hello, my name is Terrance B. and I'm a Premier Field Engineer. This blog post is about an adventure I had downloading and copying Current Branch upgrade content between networks A, B. manually.
This is the process I went through doing ConfigMgr Offline Upgrades w/o using removable media.
I verified I had a clean download-- no (redist) errors in the log using the ServiceConnectionTool. The upgrade offline media is around 22GB of data and I was missing 2 GB of content.
Here is where the fun comes in some proxy can/ will remove certain file extensions, executables or think it's malicious.
I ran into the following errors:
- Importing the upgrade bits, the process fails saying files are missing (ServiceConnectionTool.log)
- Downloaded new bits while monitoring the log for errors
- Importing the upgrade bits failed due to FIPS being enabled
- Disabled FIPS and the import was successful
- Installing the upgrade, the process fails, and the log shows a list of files not found.
- Replaced the files that were not found and re-ran the process, it failed again on different files not found.
Here is how I solved the problem and saved some valuable time!!!
I have a PowerShell script that will hash out all files including sub folders and output to a CSV file. Import the CSV file into an Array and compare Array B to original Array A from network.
If there is a file difference it will output on the screen, if everything matches up no output on the screen.
#Steps:1 Create an Hash File of the content, output to CSV file .
# GET A CSV FILE FOR EACH DIECTORY FILE HASHESÂ (NETWORK A)
Get-ChildItem -Recurse C:\Work\Dir1 | Get-FileHash -Algorithm SHA256 | Export-CSV -Path c:\Work\HASH_Dir1.CSV
# GET A CSV FILE FOR EACH DIECTORY FILE HASHESÂ (NETWORK B)
Get-ChildItem -Recurse C:\Work\Dir2 | Get-FileHash -Algorithm SHA256 | Export-CSV -Path c:\Work\HASH_Dir2.CSV
#Step:2 Copy the CSV file from Network A to network B and Import them into an Array
# IMPORT EACH DIRECTORY FILE HASH INTO AN ARRAY
$Dir1Arr= import-csv E:\work\HASH_Dir1.CSV
$Dir2Arr = import-csv E:\work\HASH_Dir2.CSV
#Step:3 # CREATE AN ARRAY OF DIFFERENCES BETWEEN THE FILES
$diffArray = Compare-Object -ReferenceObject $Dir1Arr -DifferenceObject $Dir2Arr -Property Hash
# LOOP THROUGH THE DIFFERENCES AND MATCH THEM WITH THE FILE ENTRY
ForEach ($diff in $diffArray)
{
If ($diff.SideIndicator -eq "<=")
{
$bolDir1 = $true
$Match = $Dir1Arr| Where-Object {$_.Hash -eq $Diff.Hash}
$Match.Path + " Has a hash of " + $Match.Hash
}
Else
{
$bolDir2 = $True
$Match = $Dir2Arr | Where-Object {$_.Hash -eq $Diff.Hash}
$Match.Path
$Match.Path + " Has a hash of " + $Match.Hash
}
}
Example of both arrays match up, no output
PS C:\Users\terranceB\Documents> C:\Users\terranceB\Documents\HASH_CHECK.ps1
PS C:\Users\terranceB\Documents>
Example of output difference I added a file to Dir2, so it would show an output result
PS C:\Users\terranceB\Documents> C:\Users\terranceB\Documents\HASH_CHECK.ps1
E:\Work\Dir2\TEST-TerranceB.docx
E:\Work\Dir2\TEST-TerranceB.docx Has a hash of E7B6B5EF4BE60D5BF2B288B93377DDEB7
A84FF0CCEAF2E27BD1551E05CC641C8
If you have one file that is missing manually copy the missing file, but if it more than 5 files/shares and some of the directories go as far as 8 layers deep I would recopy all the content from a good source.
Using removable media, the only problem you may run into is Antivirus scanning the content on your server and striping out files.