From b31eaf3a0b90680a9433a68eab9b697b8575446e Mon Sep 17 00:00:00 2001 From: gokcekantarci <115616017+gokcekantarci@users.noreply.github.com> Date: Tue, 2 Apr 2024 23:17:39 +0300 Subject: [PATCH] [DSC]Replace deprecated Get-WmiObject with Get-CimInstance (#32191) --- .../PowerToys.Settings.DSC.Schema.Generator/DSCGeneration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dsc/PowerToys.Settings.DSC.Schema.Generator/DSCGeneration.cs b/src/dsc/PowerToys.Settings.DSC.Schema.Generator/DSCGeneration.cs index bc6ebe33a7..0ea72e5a95 100644 --- a/src/dsc/PowerToys.Settings.DSC.Schema.Generator/DSCGeneration.cs +++ b/src/dsc/PowerToys.Settings.DSC.Schema.Generator/DSCGeneration.cs @@ -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