I got many issues when I tried to migrate the scripts developed in PS5 to PS7, such as Form, DataGridView and so on.
For a simple example, I have the following code working fine in PS 5.1.18362.1171
However, when running in PS 7.0.2, I got the error:
InvalidOperation: You cannot call a method on a null-valued expression.
$p=(Invoke-WebRequest -Uri "https://finance.yahoo.com/quote/bngo/key-statistics?p=bngo")
Is there a way to migrate code easily or I have to completely rewrite a lot of code? Thanks.