AutoSPSourceBuilder
AutoSPSourceBuilder copied to clipboard
Error in step Adding a version history file _UPDATE_HISTORY.txt
I think there's a hard coded base path somewhere in the scripte when using the UpdateLocation parameter. So when I'm using a different then the default path C:\SP\SP2019 in the very end of the process this happens:
Set-Content : Could not find a part of the path 'C:\SP\2019\_UPDATE_HISTORY.txt'.
At P:\SP-Test\AutoSPSourceBuilder\AutoSPSourceBuilder.ps1:1083 char:5
+ Set-Content -Path "$Destination\$textFileName" -Value "This media ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\SP\2019\_UPDATE_HISTORY.txt:String) [Set-Content], DirectoryNotFoundExcep
tion
+ FullyQualifiedErrorId : GetContentWriterDirectoryNotFoundError,Microsoft.PowerShell.Commands.SetContentCommand
Add-Content : Could not find a part of the path 'C:\SP\2019\_UPDATE_HISTORY.txt'.
At P:\SP-Test\AutoSPSourceBuilder\AutoSPSourceBuilder.ps1:1085 char:1
+ Add-Content -Path "$Destination\$textFileName" -Value "-------------- ...
Yes this is what $Destination defaults to if you don't specify a path for it in the command line.
I need to test this again. You see some time has passed and what I remember it was a strange error I haven't had in similar constellations. I will let you know what I find out.