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?
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.
PowerShellStandard.Library package is for creating modules and PowerShell hosts that run from within PowerShell - and the latter package is designed to work in PowerShell (Core) sessions too.