手机
当前位置:查字典教程网 >脚本专栏 >PowerShell >Powershell实现从注册表获取用户配置脚本分享
Powershell实现从注册表获取用户配置脚本分享
摘要:支持所有版本。要获得本地用户的配置文件,可以使用这个脚本:复制代码代码如下:$path='Registry::HKEY_LOCAL_MACH...

支持所有版本。

要获得本地用户的配置文件,可以使用这个脚本:

复制代码 代码如下:

$path = 'Registry::HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionProfileList*'

Get-ItemProperty -Path $path |

Select-Object -Property PSChildName, ProfileImagePath

这将获得ProfileList下所有的键值并筛选出其中的SID和相应配置路径。

复制代码 代码如下:

PSChildName ProfileImagePath

----------- ----------------

S-1-5-18 C:WINDOWSsystem32configsystemprofile

S-1-5-19 C:WindowsServiceProfilesLocalService

S-1-5-20 C:WindowsServiceProfilesNetworkSer...

S-1-5-21-1907506615-3936657230-268413... C:UsersTobias

S-1-5-80-3880006512-4290199581-164872... C:UsersMSSQL$SQLEXPRESS

【Powershell实现从注册表获取用户配置脚本分享】相关文章:

Powershell小技巧之获取字符串的行数

PowerShell函数实现类似重载功能实例

Powershell读取PFX证书并输入密码的脚本分享

Powershell小技巧之从文件获取系统日志

Powershell小技巧之查询AD用户

Powershell小技巧之获取MAC地址

Powershell小技巧之获取变量列表

Powershell小技巧之获取注册表值的类型

PowerShell小技巧之查找获取注册表路径

Powershell读取本机注册表中的所有软件关联扩展名

精品推荐
分类导航