If you want run Exchange command without credential, you need to run it on Exchange server. You can import module in PowerShell on Exchange server, then you will could run Exchange command(Exchange 2019 isn't supported):
Exchange 2010
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010;
Exchange 2013 & 2016
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;
If you need to run it from another computer, you will need to use credential, you could try with command below:
$User = "******@domain.com"
$PassWord = ConvertTo-SecureString -String "Password" -AsPlainText -Force
$UserCredential = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList $User, $PassWord
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.