I developed a custom Powershell CmdLet.
namespace GetStuff
{
using System.Management.Automation;
[Cmdlet(VerbsCommon.Get, "Stuff")]
[OutputType(typeof(Stuff[]))]
public class GetStuffCmdLet : PSCmdlet
{
}
}
after Building the project i tried to import it in PowerShell
with Import-Module .\GetStuff.dll -Force
The following Error Message appeared:
Import-Module : Could not load file or assembly 'System.Management.Automation, >Version=7.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. At line:1 char:1 Import-Module .\GetStuff.dll -Force CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand