Tôi đã sử dụng truy vấn sau đây để liệt kê người dùng trong máy chủ Windows 2008 nhưng không thành công và gặp lỗi dưới đây.Thuật ngữ 'Get-ADUser' không được công nhận là tên của lệnh ghép ngắn
$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)}
Ngoại lệ được đưa ra bên dưới ... Bất kỳ ai cũng có thể giúp tôi giải quyết vấn đề này không?
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 Cảm ơn để chỉnh sửa '[regex] '\ s'';) –
np :) mặc dù tôi sẽ thay đổi nó thành: get-mô-đun ActiveDirectory -listavailable –
@ShayLevy Có nó tốt hơn để kiểm tra một cụ thể mô-đun! Ý định của tôi là giúp user1805353 biết được mô-đun nào có thể tải. –