February 2019
Intermediate to advanced
626 pages
15h 51m
English
The Get method should evaluate the current state of the resource. The registry key will exist, but the registry value may be incorrect, or may not exist.
The Get method will act as follows:
The following snippet implements these actions:
[ComputerDescription] Get() { $key = Get-Item $this.Path if ($key.GetValueNames() -contains $this.valueName) { $this.Ensure = 'Present' $this.Description = $key.GetValue($this.valueName) } else { $this.Ensure = 'Absent' } return $this}
The Get method must return an instance of the class. It ...
Read now
Unlock full access