Im getting the following error when trying to run hosted powershell scripts before upgrading from Windows 7 I never got this error.
The following erro
The solution is to do the following, rather than only adding a block for only System.Management.Automation as suggested by the posts I read, you need to add one for all referenced PS assemblies.