Weirdly, in one of my script I am trying to do such a call:
Get-Package -Path "c:\inetpub\wwwroot\Platform.dev.local\App_Data\packages\This.File.Was.JustCreated.xml"
but what I get in return is:
Get-Package : A parameter cannot be found that matches parameter name 'Path'.
Given XML file does exist. Moreover, that same script should have access to it as it was that script itself who generated this file on the previous step.
The documentation is confusing: it says that Get-Package "Loads the package definition (xml) from the specified path." but the demo shows that it is trying to get from an item. In any case, the error is unable to get a parameter value.