2017-02-28 46 views
1

在我們的服務器列表中,我們有Bitvise SSH服務器,出口Windows帳戶從bitvise SSH服務器控制面板

WinssHD Setting

我們有超過150個的Windows帳戶,每個帳戶不同的目錄已被映射。現在我想導出用戶帳戶列表和它的映射。這個問題聽起來可能很愚蠢,但是任何人都可以幫助我導出Windows帳戶用戶列表以及所有其他現有的詳細信息?

Windows account details

回答

1

hereherehere

#you may need to put your server version here like BssCfg721 
$cfg = new-object -com "BssCfg726.BssCfg726" 

$cfg.LoadServerSettings() 

#this exports all windows accounts to csv file 
$cfg.settings.access.winAccounts | Export-Csv 'c:\export.csv' 
+0

一個'#Requires -RunAsAdministrator'可能是有益的,因爲冗長的屬性的幫助始終是相同的'$ cfg.settings.access .winAccounts |選擇* -ExcludeProperty幫助| Export-Csv'c:\ export.csv''會將輸出減少到可用長度。 – LotPings