Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Unable to find type [System.Managemet.Automation.PSCredential]

$
0
0

Hello,

I have module which has one of the parameters of type System.Managemet.Automation.PSCredential and yet when I try to run it complains about module being unknown. Not sure what's going on here. Declaration of my module is below 

   

function RecycleMultiplePools{
[cmdletBinding(SupportsShouldProcess=$true,ConfirmImpact="High")] 
param
(

    [parameter(Mandatory=$true,ValueFromPipeline=$true,ParameterSetName="explicit")] 
    [string[]]$ComputerName,

    [parameter(Mandatory=$false)] 
    [System.Managemet.Automation.PSCredential]$Credential,

[parameter(Mandatory=$true,ParameterSetName="FromDNS")]
[string]$SetName
)

Error i'm getting when running it is below

PS C:\WINDOWS\system32> RecycleMultiplePools
RecycleMultiplePools : Unable to find type [System.Managemet.Automation.PSCredential]. Make sure that the assembly that contains this type is loaded.
At line:1 char:1
+ RecycleMultiplePools
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Managemet.Automation.PSCredential:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound


Viewing all articles
Browse latest Browse all 21975

Trending Articles