I'm writing a nuget install script in powershell and I want to access to all the PropertyGroup elements of the project file (\*.csproj)?

I have access to a variable called $project which represents an object, I believe it to implement the Project interface from [EnvDTE](https://msdn.microsoft.com/en-us/library/envdte.project.aspx) - an abstraction of the project file (\*.csproj).

How does I get the PropertyGroup instances from the $project object?

I want the ability from the nuget install powershell script to change the 
OutputPath for all PropertyGroup elements that contain this child element.