我需要一点帮助来删除我域中的计算机中的所有用户配置文件。如果用户超过 x 天没有登录到特定的计算机,在我的情况下是 60 天。
我已尝试使用 Windows Server 2008 R2 的默认域策略,但似乎不起作用。
有人可以提出任何想法吗?我该如何实现它?
谢谢
答案1
使用德尔普罗夫2在启动脚本或计划任务中
Usage: delprof2 [/l] [/u] [/q] [/p] [/r] [/c:[\\]<computername>] [/d:<days> [/ntuserini]] [/ed:<pattern>] [/id:<pattern>] [/i]
/l List only, do not delete (what-if mode)
/u Unattended (no confirmation)
/q Quiet (no output and no confirmation)
/p Prompt for confirmation before deleting each profile
/r Delete local caches of roaming profiles only, not local profiles
/c Delete on remote computer instead of local machine
/d Delete only profiles not used in x days
/ntuserini
When determining profile age for /d, use the file NTUSER.INI
instead of NTUSER.DAT for age calculation
/ed Exclude profile directories whose name matches this pattern
Wildcard characters * and ? can be used in the pattern
May be used more than once and can be combined with /id
/id Include only profile directories whose name matches this pattern
Wildcard characters * and ? can be used in the pattern
May be used more than once and can be combined with /ed
/i Ignore errors, continue deleting