Bonjour à tous,
J'ai actuellement créé un script en Powershell que je voudrais convertir en batch sachant que j'ai beaucoup plus de facilité en powershell plutôt qu'en batch avez vous une solution ?
Merci d'avance
Code Powershell : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 Get-ChildItem 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\ProfileList' | ForEach-Object { $CheminUtil=$_.GetValue('ProfileImagePath') if($CheminUtil -nomatch 'admincd45|computacenter|NetworkService|Localservice|systemprofil'){ Write-Host "Supprimé : $CheminUtil" -ForegroundColor green Remove-Item -Path $CheminUtil -Confirm } else{ Write-Host "Non Supprimé : $CheminUtil" -ForegroundColor red } }
Partager