Ho utilizzato la seguente query per elencare gli utenti in un server Windows 2008, ma non è riuscito e ho ottenuto l'errore seguente.Il termine "Get-ADUser" non è riconosciuto come il nome di un 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)}
L'eccezione è riportata di seguito ... Qualcuno può aiutarmi a risolvere questo?
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 Grazie per la modifica del '[regex] '\ s'';) –
np :) se io la cambierei per: Get-Module ActiveDirectory -listavailable –
@ShayLevy Sì, è meglio controllare una specifica modulo! La mia intenzione era di aiutare user1805353 a sapere quale modulo può caricare. –