I have a problem with the command : Get-DnsServerResourceRecord
I make a script for management AD.
I use a function for listing all DNS in the AD and ask the user if he wants to create or delete an entry.
If the user go to the DNS section in the script, my script use the command:
Get-DnsServerResourceRecord -ZoneName $zonedns -RRType A
But there is no list and the script continue.
After the user chose to create or delete an entry, the command is activated again for see the modification on the list.
At that moment, the list appears two time in a row. It’s like if the first demand was in a state on standby and run with the second time.
After that, if the user continues to use the script, the command works perfectly at the right time.
But I don’t understand why on the first try, the list doesn’t appear but works with the second call.
Thanks for your help.
Welcome to the forum.
PowerShell does not necessarily display all output in order. There are ways to circumvent this behaviour. Please show your code.
When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Thanks in advance
How to format code in PowerShell.org <---- Click
One simple solution usualy is to add a format cmdlet like
Format-Wide to the command you want to output something in order.
When you crosspost the same question at the same time to different forums you should at least post links to the other forums along with your question to avoid people willing to help you making their work twice or more.
AND BTW: It’s not a bug!!
Thanks for your reply.
I stop asking here, someone help me on the other forum.
Sorry for not posting link with other forum.
I don’t do that again ^^
I think you can edit the subject to solved.
And thanks for the answer : It’s not a bug