Ho provato ad eseguire, come amministratore, questo script:
$username = "xxx"
([adsi]("WinNT://$env:computername")).psbase.invoke("Delete","User",$username)
Remove-Item (gwmi win32_userprofile | select-Object @{n='user';e={(new-object system.security.principal.securityidentifier($_.sid)).translate([system.security.principal.ntaccount])}},localpath,sid | ? {$_.user -eq "$env:computername\$username"}).LocalPath -Recurse -Force
ma i riferimenti dell'utente cancellato situati nel registro (come le chiavi del sistema di indicizzazione o le chiavi HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Media Player NSS\3.0\MAC Access Control\xxx-SID o HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Media Player NSS\3.0\Server Settings\xxx-SID o HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache\PurgeAtNextLogoff/"xxx-SID"="" o HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\xxx-SID o ...) rimangono anche riavviando Windows 7. Come mai?
GRAZIE
CIAO