I'm having some troubles with a basic powershell command.
If i run get-website (after enabling the webadministration snappin) and running "%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -NoExit -ImportSystemModules", I see a list of the 10 or so websites on my IIS 7.0 server on Server 2008 Standard (SP2, not R2). It works as expected by listing these items:
- name
- ID
- State
- Physical Path
- Bindings
But when I do:
get-website | export-csv C:\my_list.csv
I get many more items with "Microsoft.IIs.PowerShell.Framework.ConfigurationElement" instead of the actual value.
When it's exported to CSV it also says "Microsoft.IIs.PowerShell.Framework.ConfigurationElement" for bindings when it didn't prior (when the output was in the shell).
It's sort of halfway there...
Is there a way I can modify the one-liner so I can have a list of websites with all details without "Microsoft.IIs.PowerShell.Framework.ConfigurationElement" ?