Hello,
I am fairly new to powershell scripting. With that said, I have a script that creates a CNAME record in dns. The script runs fine when clicking the 'Run' button in Powershell Studio 2020. I added this script to a larger config script, and now the script fails. After doing some troubleshooting, I found that this section runs fine in PS 2020 if I highlight the create CNAME code and right click "Run Selection", but fails if I select "Run Selection in Console.
Any Idea what I am doing wrong?
Any guidance would be appreciated!
Run Selection in Powershell studio
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Run Selection in Powershell studio
There is absolutely no way to answer your question. I can on,.y recommend running this in debug mode and stepping through your code to see what is happening.
I can also recommend starting with the following free book which will help you understand how PowerShell code works and how to run and debug PowerShell code.
https://www.sapien.com/books_training/W ... werShell-4
Good luck and post back when you have more information.
I can also recommend starting with the following free book which will help you understand how PowerShell code works and how to run and debug PowerShell code.
https://www.sapien.com/books_training/W ... werShell-4
Good luck and post back when you have more information.