Skip to content

Commit 4a47d4d

Browse files
Update to $xmldata.Load("$ExportPath\$($ManagementPack.Name).xml") 🐦
1 parent 06f2350 commit 4a47d4d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Powershell/Remove-MPDependencies-v1.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ PROCESS
176176
if ($Unsealed -and $RemoveUnsealedReferenceAndReimport)
177177
{
178178
Write-Output "$(Time-Stamp)Attempting to remove related data in the Unsealed Management Pack: $ExportPath\$($ManagementPack.Name).xml"
179-
$xmldata = [xml](Get-Content "$ExportPath\$($ManagementPack.Name).xml" -ErrorAction Stop);
179+
$xmldata = [xml]::new()
180+
$xmldata.Load("$ExportPath\$($ManagementPack.Name).xml")
180181
#Save a backup of the MP
181182
$xmlData.Save("$ExportPath\$($ManagementPack.Name).backup.xml")
182183
#Get the version of the MP

0 commit comments

Comments
 (0)