
Sometimes Configuration Manager administrators point to the path containing the distribution package files as the local path (it starts with the drive letter on the CM Site Server). This may work well until you migrate or use the Active - Passive server layout. Then it is definitely better to use the network path.
Since the subsequent correction of paths in the console is cumbersome, and we avoid editing the database as a rule, so it remains to use a script that will do the job for us.
If the distribution packages have been placed in their own directories inside a common parent directory, a Powershell script can be used[1], swapping paths, of course:

Â
It is most convenient to run the script in a Powershell instance launched from the Configuration Manager admin console, so that there is no need to load the module manually.
The script prints out the previous and new path:
Â

In this case, a shared directory was indicated, although the physical location of the source files of the distribution packages did not change.
[1] We assume for simplicity that the packages are in one parent directory. If so, you may not need to run the script several times with the paths indicated differently