Can Get-DNSServer produce output in readable CSV or TXT and not XML?
Hello,
A Get-DNSServer -CN MyDC1 run from the console produces a nice formatted list of info to the console. An export-csv of this same data gives me headings, but no data. An Export-Clixml works, but I can view/use the data in this format. Converting
xml to csv doesn't work as well. A Format-List, then Out-File doesn't give me the data either.
Any suggestions on how I can get properly formatted CSV file with this output or at least, a Format-List to a text file?
Thanks for your help! SdeDot
You have to do a bit of finessing with the output objects to get it to look somewhat presentable. Here is one example of what I used:
Get-DnsServer -ComputerName DC1 | ForEach-Object {
[pscustomobject]@{
PSComputerName = $_.PSComputerName
ServerCache = ($_.ServerCache | Out-String).Trim()
ServerDiagnostics = ($_.ServerDiagnostics | Out-String).Trim()
ServerDsSetting = ($_.ServerDsSetting | Out-String).Trim()
ServerEdns = ($_.ServerEdns | Out-String).Trim()
ServerForwarder = ($_.ServerForwarder | Out-String).Trim()
ServerGlobalNameZone = ($_.ServerGlobalNameZone | Out-String).Trim()
ServerGlobalQueryBlockList = ($_.ServerGlobalQueryBlockList | Out-String).Trim()
ServerRecursion = ($_.ServerRecursion | Out-String).Trim()
ServerRootHint = ($_.ServerRootHint | Out-String).Trim()
ServerScavenging = ($_.ServerScavenging | Out-String).Trim()
ServerSetting = ($_.ServerSetting | Out-String).Trim()
ServerZone = ($_.ServerZone | Out-String).Trim()
ServerZoneAging = ($_.ServerZoneAging | Out-String).Trim()
ServerZoneScope = ($_.ServerZoneScope | Out-String).Trim()
} | Export-Csv -NoTypeInformation DNS.csv
You will also need to adjust the formatting on the spreadsheet to really present all of the data (expand the width on the columns), but it does end up working.
Boe Prox
Blog |
Twitter
PoshWSUS |
PoshPAIG | PoshChat |
PoshEventUI
PowerShell Deep Dives Book
Similar Messages
-
V1.5 Export to CSV or TXT and not getting all rows (600K+)
We've recently moved to SQL Developer from a third party application and have been running into issues attempting to export very large queries (600K+ rows). We did find a very helpful article which suggested modifying the sqldeveloper.conf file settings which now will apparently allow us to run the query, but when we go to import into Access where some forecasting routines have been written, not all of the rows are coming into the file. BTW we are running on Windows XP.
Has anyone else seen this?
The 2 changes made to the sqldeveloper.conf file are:
modify to increase to 512: AddVMOption -XX:MaxPermSize=512M
Add this entry: AddVMOption -Xmx768M
We thought increasing the Xmx setting might help, but setting it to 1024M results in a JVM error where the program won't even launch.
Any help or suggestions would be greatly appreciated.
Edited by: user590541 on Jan 13, 2010 5:32 PMCouple of things;
Sure you need the export? ODBC can link dynamically to your Oracle DB.
Sure the export file is missing the rows and it's not Access? Please verify.
If so, you could just export in 2 steps (limiting the export files using the PK or ROWNUM).
Hope that helps,
K. -
I have an older iPhone (3gs) and need to upgrade to a newer phone (4S). I need to get my NOTES, CALENDAR, CONTACTS, PICTURES, etc backed up on iTunes so I can get that data loaded onto the new phone. But not sure how to do that. When I open iTunes it has a button that say "Back Up iPhone", but I'm not sure what that does. When I go into the sync options it say I have another user account and asks me if I want to merge of replace. I'm assuming it's trying to tell me I have an older iTunes Library, but don't know that. Geez, maybe people over 60 shouldn't have iPhones, iTunes just bafles me.
http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
-
In mail, my attachments, both photos and documents, appear in the body of the message. How can I get my attachments to appear as a separate attachment and not as part of the main message???? Thanks for your help, Karen.
softwater wrote:
...and costs $14.99
Yep! And if you absolutely need (or think you need) that functionality, it is worth every penny.
As Don already pointed out, exactly what the recipient sees will depend on how they've set up their machine and what unnecessary 3rd party apps they might've installed to display attachments the way they want.
In theory, that is true. In practice, Attachment Tamer will cause more of your messages to show up as plain-jane icons on the other end. The problem is, after all, people running Outlook 2003 and 2007. These people likely aren't doing many system modifications.
If I were you, I'd use the free solutions provided above, save my money and let my recipients decide how they will handle their mail.
I completely agree. -
i've tried to set up a new user on a mac book pro and i restarted it to create the new account but now all i can get is a white screen with the apple logo and the loading symbol what can i do ?
Look at this support article:
http://support.apple.com/kb/ts2570
Ciao. -
The updated iPhoto program is cumbersome. I am trying to create a Christmas card and can't figure out how to get the fold of the card on the left and not on the top of the card. I had no trouble with this for the past two years. Can someone help?
Click on the Layout button lower right and choose a Vertical lyout from the dropdown
-
Hello, I have an iPod touch and it don't has light or brightness. I can see the icons and use it but can get it work properly. I went to settings and the brightness is adjusted tu full level. Any idea?
Try a system reset. It cures many ills and it's quick, easy and harmless...
Hold down the on/off switch and the Home button simultaneously until the screen blacks out or you see the Apple logo. Ignore the "Slide to power off" text if it appears. You will not lose any apps, data, music, movies, settings, etc. -
Is there a mac program i can get to impose a moving mouth on a still and for making movies easier
is there a mac program i can get to impose a moving mouth on a still and for making movies easier ? Thanks
Looks like you posted the same question on Nov 12, 2011. Did mr totes' response not help?
-
hi does anyone know how i can get a refund on here i bought 3 songs and they dont play the full song.?
-Thanx you XOFirst, how are you trying to play them? You need to play them by clicking on library on the left side of iTunes and clicking on music. The whle song will play by doing this.
-
Since Febuary 14th, 2013 we are unable to send and recieve email using our hotmail account on our Iphone. We can get our email by loggin in with our computer but not using our Iphone.
Hotmail has been discontinued for some time now. See:
http://windows.microsoft.com/en-us/windows/outlook/auto-upgrade-outlook-faq -
How can I transfer photos from my iMac to my iPad and not lose the ones already stored on the iPad? When using iTunes to sync a folder from the iMac to the iPad it always removes anything previously synced.
Help appreciated
DavidI've just found out the reason for this behaviour. I am syncing from a computer which is different to the one I first synced with. iTunes can't cope with this situation so deletes anything synced from another source.
-
I am using a MacBook Pro previously owned by a colleague.
I can't update them as I have my own AppleID and not my colleague's.
How do I change the AppleID matched to my utilities (iPhoto, iMovie, ...)?What system version are you running and what version of iApps do you currently have?
How do I change the AppleID matched to my utilities
What versions did you have? Did you purchase the iApps with your Apple ID as some previous time?
Go into the System/iCloud preference pane and sign out. Then sign back in with your Apple ID. Also sign in to the App Store with your Apple ID. If you have purchased those apps previously you'll be able to download them for free from the Purchases section.
OT -
My iMessage is only allowing me to select messages to be sent and received from my email. If my number is an option, but it will not let me select my number, how do I get the iMessages to be sent to my number and not my email?
Try ejecting your iphone from iTunes and then close iTunes. Now retry. Hope this helps.
-
Can I use time capsule as a back-up device and not use the wireless?
Hello. I have recently had many issues with a new Time Capsule.
My question is : Can I use my TC as a back-up device and not wireless while I am using my Lynksys router as my WiFi device? Thx.Can I use my TC as a back-up device and not wireless while I am using my Lynksys router as my WiFi device?
Yes, turn off the wireless on the TC if you want to do this.
Open AirPort Utility, click on the TC, and click Edit
Click the Wireless tab at the top of the page
Change Wireless Mode to Off
Update to save the new settings -
Changed my ID but the Iphone 4 continue with the old ID name and does not syncronize. How can I change it in my Iphone so I can continue to use all my data stored like contacts and notes?
Do you mean through iCloud? You need to go to settings > iCloud and "delete account" and then sign in with the newly named account. You'll want to do similar for facetime, messages, and store.
Maybe you are looking for
-
Use Automator to create new subfolders in a selected folder
This seems like it should be easy to accomplish, but I have had no luck. I want to be able to select a folder, and then run an Automator Service to create a specific set of subfolders within the selected folder. I am able to set up automator to creat
-
Material description limitation on accept only English language
Dear All, Is there any user exit / program which not allow user create material with Non English description in MM01? But we still need unicode support for system. we are facing export material problem with external system out from company. thanks.
-
Hi, I found some discrepency on the results shown by memory profiler of JDEV (9.0.2) and that of NetBeans (IDE 4.0). Also, results of JDEV profiler is in contradiction to what Sun Java says (as per my own interpretation!). Here is what I am trying to
-
How does the Approvals process work in Oracle Hyperion Planning v 11.1.2
Hi, I have recently upgraded to Oracle Hyperion Planning v 11.1.2 and the way that the application handles budget / Forecast approvals appears to have changed. Is anyone able to direct me to a user manual or provide me with some guidance on how to se
-
Problem displaying my form with Form9i
Yep I got another problem with Form9i :/ The problem is when I try to execute my form, It doesn`t load my form but a form with an Oracle background...anyway nothaing related with the form that I expect to look at. PS: I start Oc4j instance before I l