To get the csproj files use Get-ChildItem
Get-ChildItem c:\myProjects *.csproj -recurse
Then you can use e.g. Select-Xml
like this:
$ns = @{ defaultNamespace = "http://schemas.microsoft.com/developer/msbuild/2003" }
Get-ChildItem c:\myProjects *.csproj -recurse |
Select-Xml -xpath '//defaultNamespace:PropertyGroup[1]' -namespace $ns |
Select-Object -expand Node
You have to correct the default namespace. I have no csproj file by hand right now.
(for more info about xml and xpath in PowerShell see http://huddledmasses.org/xpath-and-namespaces-in-powershell/)
The Select-Object
is needed to expand the actual node property.
If you would like to work with xml like with object, you can use this:
Get-ChildItem c:\myProjects *.csproj -recurse |
% { $content = [xml](gc $_.FullName); $content.Project.PropertyGroup[someindex...] }