Last active
March 4, 2026 05:07
-
-
Save mbaldessari/a2483fdb0e25b0fce8a753ca2bd31012 to your computer and use it in GitHub Desktop.
Windows Ansible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Check for VS Studio processes | |
| ansible win11 -m ansible.windows.win_shell -a 'Get-Process | Where-Object { $_.ProcessName -match "setup|vs_|install|winsdk" } | Select-Object ProcessName, Id, CPU, StartTime' | |
| # Check for VS Studio log files | |
| ansible win11 -m ansible.windows.win_shell -a '(Get-ChildItem "$env:TEMP" -Filter "dd_setup_*" -ErrorAction SilentlyContinue | Where-Object { $_.Name -match "dd_setup_\d{14}_\d+" } | Measure-Object).Count; Get-ChildItem "$env:TEMP" -Filter "dd_setup_*" -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | Select-Object Name, LastWriteTime -First 3' | |
| # Get last lines of log file | |
| ansible win11 -m ansible.windows.win_shell -a 'Get-Content "$env:TEMP\dd_setup_20260303182329.log" -Tail 15' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment