Hi,
Windows PowerShell 5.1 is compatible with the previous versions and your scripts tested in version 3.0 should work fine. For the first question, as it's more related to .net framework you can start a new thread with a dotnet tag.
Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.