如何使用 PowerShell 获取系统上的所有用户配置文件?
所有新的用户配置文件都是在Windows系统上创建的路径,
'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\'
要检索所有用户配置文件,我们可以使用
gci 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\' | ForEach-Object { $_.GetValue('ProfileImagePath') }ProfileImagePath属性显示用户配置文件的位置。
检索用户配置文件的另一种方法是使用WMI。
PS C:\> gwmi win32_userprofile |Select -ExpandProperty LocalPath输出结果
C:\Users\.NET v2.0 Classic C:\Users\.NET v4.5 Classic C:\Users\.NET v2.0 C:\Users\.NET v4.5 C:\Users\Classic .NET AppPool C:\Users\Administrator.AUTOMATIONLAB C:\Users\delta
热门推荐
10 新年门口花束祝福语简短
11 盘锦结婚祝福语大全简短
12 父母生日祝福语 简短独特
13 家庭恩爱祝福语简短英文
14 高考俄语祝福语大全简短
15 虎年祝福语 诗句唯美简短
16 生日婚礼祝福语简短精辟
17 虎年喝酒拜年祝福语简短
18 教师闺蜜祝福语简短