I migrated from .NET Framework 4.8 to .NET 6.
System.Management.Automation.PowerShell.Create();
now returns null.
Is there a new package i need to reference or other solution?
Removing the old References and adding the NuGet package
Microsoft.PowerShell.SDK
solved this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With