Open qlik-okl opened 1 week ago
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!
The wmic command used in https://github.com/saltstack/salt/blob/221420cd5719c3f201a3114310a93c167b9e52e3/salt/grains/disks.py#L155 can be replaced by a corresponding powershell command like this
Get-CimInstance -Namespace root/Microsoft/Windows/Storage -query 'select * from MSFT_PhysicalDisk' | ft DeviceID,MediaType
Giving its output in identical format as the old wmic command.
(Tested on a Windows 11 24H2 box)
Since we're using PowerShell anyway I decided to use Get-PhysicalDisk
instead.
Description of the tech debt to be addressed, include links and screenshots
As detailed in https://techcommunity.microsoft.com/t5/windows-it-pro-blog/wmi-command-line-wmic-utility-deprecation-next-steps/ba-p/4039242 wmic is going away, and is actually removed by default in latest versions of for example Windows 11. This results in errors like
Saltstack needs to replace wmic dependency and use one of the proposed replacements in the article linked above.
Versions Report
Minion salt-call --version salt-call 3007.1 (Chlorine) Master also running 3007.1