Consider putting the directive System in front of System.Management.Automation