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> RecycleMultiplePoolsRecycleMultiplePools : 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