欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Powershell實(shí)現(xiàn)從注冊(cè)表獲取用戶配置腳本分享

 更新時(shí)間:2015年03月25日 08:56:14   投稿:junjie  
這篇文章主要介紹了Powershell實(shí)現(xiàn)從注冊(cè)表獲取用戶配置腳本分享,本文直接給出實(shí)現(xiàn)腳本源碼,需要的朋友可以參考下

支持所有版本。

要獲得本地用戶的配置文件,可以使用這個(gè)腳本:

復(fù)制代碼 代碼如下:

$path = 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\*'
 
Get-ItemProperty -Path $path |
  Select-Object -Property PSChildName, ProfileImagePath

這將獲得ProfileList下所有的鍵值并篩選出其中的SID和相應(yīng)配置路徑。

復(fù)制代碼 代碼如下:

PSChildName                              ProfileImagePath                       
-----------                              ----------------                       
S-1-5-18                                 C:\WINDOWS\system32\config\systemprofile
S-1-5-19                                 C:\Windows\ServiceProfiles\LocalService
S-1-5-20                                 C:\Windows\ServiceProfiles\NetworkSer...
S-1-5-21-1907506615-3936657230-268413... C:\Users\Tobias                        
S-1-5-80-3880006512-4290199581-164872... C:\Users\MSSQL$SQLEXPRESS               

相關(guān)文章

最新評(píng)論