I'm trying to use SIF 2.0 to uninstall a no longer used Sitecore 9.1 instance.
This method used to work perfectly with previous versions and I know that for sure since I'm quite a hard user.
I don't know exactly if that's something with SIF 2.0 or something with my given instance. It's a vanilla Sitecore 9.1 + SPE 5.0 + SXA 1.8.
[------------------------------------------------------------------------- SitecoreXP0_RemoveHostHeader : HostHeader ------------------------------------
[SitecoreXP0_RemoveHostHeader]:[Backup] Created - C:\Windows\system32\drivers\etc\hosts.backup
Removing host entry for 127.0.0.1 with hostname 'Sitecore91.SXA.sc'...
Uninstall-SitecoreConfiguration : Stream was not readable.
At C:\Sitecore\Install Packages\9.1\XP0\XP0-SingleDeveloper.ps1:77 char:1
+ Uninstall-SitecoreConfiguration @singleDeveloperParams *>&1 | Tee-Obj ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
[TIME] 00:00:07
Set-Content : Stream was not readable.
At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\2.0.0\Public\Tasks\Invoke-HostHeaderTask.ps1:57 char:4
+ Set-Content -Path $hostsFile -Value $updatedHostsContent ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (C:\Windows\system32\drivers\etc\hosts:String) [Set-Content], ArgumentException
+ FullyQualifiedErrorId : GetContentWriterArgumentError,Microsoft.PowerShell.Commands.SetContentCommand
host.backup
file before pranking me, so I'm back on the game. But did you find the cause of this weird behavior? – Hugo Santos Feb 12 '19 at 18:41