mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-21 08:29:01 +08:00
[DSC]Replace deprecated Get-WmiObject with Get-CimInstance (#32191)
This commit is contained in:
parent
794a5db1b0
commit
b31eaf3a0b
@ -249,7 +249,7 @@ class {{module.Name}} {
|
||||
if ($this.Debug -eq $true) {
|
||||
$SettingsExePath = "{{debugSettingsPath}}"
|
||||
} else {
|
||||
$installation = Get-WmiObject Win32_Product | Where-Object {$_.Name -eq "PowerToys (Preview)" -and $_.Version -eq "{{version}}"}
|
||||
$installation = Get-CimInstance Win32_Product | Where-Object {$_.Name -eq "PowerToys (Preview)" -and $_.Version -eq "{{version}}"}
|
||||
|
||||
if ($installation) {
|
||||
$SettingsExePath = Join-Path (Join-Path $installation.InstallLocation WinUI3Apps) PowerToys.Settings.exe
|
||||
|
Loading…
Reference in New Issue
Block a user