$App = New-Object -TypeName Microsoft.SqlServer.Dts.Runtime.Application;
$PackageFullPath = 'C:\SSISPackage.dtsx';
$Package = $App.LoadPackage($PackageFullPath, $null, 0);
$x = $Package.Connections
$x.Remove("Something")
$App.SaveToXml($PackageFullPath, $Package, $null)
My question is when I assign the instance to a new variable $x, how do I know when I call a method on $x that it will reflect on $Package? So when I remove someting from $x, will it also remove that thing from $Package? If the answer is "it depends" how can I know without setting up an experiment?