Skip to content

Commit

Permalink
switch from wmisearcher to full type so module can be imported on Lin…
Browse files Browse the repository at this point in the history
…ux again

moving the [wmisearcher] accelerator from Get-LSUpdate to LSUClient.psm1
caused the class-not-found error during module import already rather
than only when attempting to run Get-LSUpdate. Allowing the module to be
imported on Linux is useful to generate the PlatyPS docs in CICD.
  • Loading branch information
jantari committed Jul 31, 2023
1 parent 2860512 commit c60f5f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LSUClient.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ class MachineCharacteristics {
if ($Overrides.ContainsKey('_CPUAddressWidth')) {
$this._CPUAddressWidth = $Overrides['_CPUAddressWidth']
} else {
$this._CPUAddressWidth = [wmisearcher]::new('SELECT AddressWidth FROM Win32_Processor').Get().AddressWidth
$this._CPUAddressWidth = [System.Management.ManagementObjectSearcher]::new('SELECT AddressWidth FROM Win32_Processor').Get().AddressWidth
}

if ($Overrides.ContainsKey('_Bios')) {
Expand Down

0 comments on commit c60f5f2

Please sign in to comment.