Skip to content

Instantly share code, notes, and snippets.

@mbaldessari
Last active March 4, 2026 05:07
Show Gist options
  • Select an option

  • Save mbaldessari/a2483fdb0e25b0fce8a753ca2bd31012 to your computer and use it in GitHub Desktop.

Select an option

Save mbaldessari/a2483fdb0e25b0fce8a753ca2bd31012 to your computer and use it in GitHub Desktop.
Windows Ansible
# 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