A tricky one…
I have a function that builds and array of all supported resolutions on a machine using WMI classes : It Works
I use that code in two other functions,
One uses a dynamic parameter with a validateset built using the first function code It Works
The other uses the same code to build an argument completer for a parameter It also works.
Now , I creates a pscustomobject, adds two noteproperties : name and resolution It works.
NOW , THE PROBLEM ….
Of course I can set name and resolution properties of my pscusomobject using $Custobj.name = “oooo” and $Custobj.resolution = “thisresolution”
Now, If I create a scriptmethod like this :
Changeresolution =
{
Param
(
$NewResolution
)
$this.resolution = $Newresolution
}
IT WORKS BUT DOES NOTHING MORE…
I COULD NOT FOUND HOW TO BE ABLE TO USE THE CHANGERESOLUTION METHOD AND HAVE THE POSSIBLE VALUE PROPOSED. Any idea ???