(ภาษาอังกฤษของฉันแย่) สวัสดี Techies
ฉันกำลังพยายามรับสถิติกล่องจดหมายโดยใช้ PowerShell ระยะไกลโดยดำเนินการ cmd ในฐานะผู้ดูแลระบบ
powershell -command "$session=New-PSSession -ComputerName 'EX2' -Credential $cred; invoke-command -Session $session -ScriptBlock { Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010; dir env:}"
คำสั่งนี้ก็โอเค
แต่ฉันเปลี่ยนคำสั่งเป็น Get-MailboxDatabase
powershell -command "$session=New-PSSession -ComputerName 'EX2' -Credential $cred; invoke-command -Session $session -ScriptBlock { Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010; Get-MailboxDatabase -Status}"
ฉันได้รับ ADInvalidCredentialException
: