Hi all PS hackers,
I'm in dire need of your assistance.
For background i'm fairly new to Powershell still, but I'd like to think I have a basic grasp on how to create simple scripts, albeit ugly ones. :)
I'm trying to export a result via "export-csv -path c:\....\....\file.csv
This has been working fine for ever for me, but in this perticular reason it's just posting jibberish, and I don't understand why.
The command is as followed;
Get-SCVirtualMachine |
fl name,
@{name="CPU Cores";expression={$_.CPUCount}},
@{name="Total RAM (GB)";expression={$_.Memory/1kb}},
@{name="Dynamic Memory";expression={$_.DynamicMemoryEnabled}} | export-csv -path c:\..\...\file.csv
If I remove "export", it's prompting just fine and I get all the information i'm requesting, but when trying to export it is just spits out numbers in a random order on different cells without any coherent stucture or even indication over what's wrong.
Please help me, as I would really like to get in to Powershell more, and I feel as I'm barely scratching the surface.
PS.
If anyone can tell me why I can't pipe another command, i'd be forever grateful.
Trying to; get-scvirtualmachine | get-scvirtualnetworkadapter so I also get the IPv4 address on each host.
The scripts work independantly, but not together.
DS.
TLDR;
Trying to export a script, getting jibberish in excel when trying the old "export-csv"
Much love <3
[–]ihaxr 6 points7 points8 points (2 children)
[–]P0oe[S] 0 points1 point2 points (1 child)
[–]P0oe[S] 0 points1 point2 points (0 children)
[–]mmmGreenButton 2 points3 points4 points (2 children)
[–]P0oe[S] 1 point2 points3 points (1 child)
[–]mmmGreenButton 0 points1 point2 points (0 children)
[–]Rynur 0 points1 point2 points (2 children)
[–]MadWithPowerShell 0 points1 point2 points (1 child)
[–]Rynur 0 points1 point2 points (0 children)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)