Powershell.Create("get-process").Invoke();
should be
Powershell.Create().AddScript("get-process").Invoke();
at https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.powershell?view=powershellsdk-1.1.0
As an aside: Clicking Edit on the linked page results in a 404, pointing to nonexistent path underneath https://github.com/MicrosoftDocs/powershell-docs-sdk-dotnet - perhaps these links can be disabled while the SDK doc sources aren't yet maintained on GitHub.
Powershell.Create("get-process").Invoke();should be
Powershell.Create().AddScript("get-process").Invoke();at https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.powershell?view=powershellsdk-1.1.0
As an aside: Clicking
Editon the linked page results in a404, pointing to nonexistent path underneathhttps://github.com/MicrosoftDocs/powershell-docs-sdk-dotnet- perhaps these links can be disabled while the SDK doc sources aren't yet maintained on GitHub.