我已經使用以下查詢來列出Windows 2008服務器中的用戶,但失敗並且得到以下錯誤。術語'Get-ADUser'不被識別爲cmdlet的名稱
$server='client-pc-1';$pwd= convertto-securestring 'password$' -asplaintext -
force;$cred=new-object -typename System.Management.Automation.PSCredential -argumentlist 'Administrator',$pwd; invoke-command -computername $server -credential
$cred -scriptblock {Get-ADUser -Filter (enabled -ne $true)}
下面給出的例外......任何人都可以幫助我解決這個問題嗎?
The term 'Get-ADUser' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct
and try again.
+ CategoryInfo : ObjectNotFound: (Get-ADUser:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
@ShayLevy感謝編輯'[正則表達式]'\ s'';) –
NP :)雖然我將其更改爲:獲得模塊的ActiveDirectory -listavailable –
@ShayLevy是的,它是更好地檢查特定模塊!我的意圖是幫助用戶1805353知道哪個模塊可以加載。 –