Link to home
Start Free TrialLog in
Avatar of Member_2_6474242
Member_2_6474242Flag for Fiji

asked on

script to get queue statistics

I have used the below to try and create the same script

$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://xxx.com/PowerShell/ -Authentication Kerberos
Import-PSSession $s

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
. $env:ExchangeInstallPath\bin\RemoteExchange.ps1

Connect-ExchangeServer -auto

$threshold = 10
$filename = "c:\Temp\QueueStats.txt"
Start-Sleep -s 10
if (Get-ExchangeServer | Where { $_.Name -eq "Mail" } | get-queue | Where-Object { $_.MessageCount -gt $threshold })
{

Get-ExchangeServer | Where { $_.Name -eq "Mail" } | get-queue | Where-Object { $_.MessageCount -gt $threshold } | Format-Table -Wrap -AutoSize | out-file -filepath c:\Temp\QueueStats.txt
Start-Sleep -s 10

 
$smtpServer = "10.0.1.6"
Write-Host "Connecting to $smtpServer"
$msg = new-object Net.Mail.MailMessage
$att = new-object Net.Mail.Attachment($filename)
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = "rsharma@xxx.com"
$msg.To.Add("rsharma@xxx.com")
$msg.To.Add("rprasad@xxx.com")
$msg.Subject = "EXCHANGE SERVER - CAS THRESHOLD ALERT!!!"
$msg.Body = "Please see attached queue log file for queue information. "
$msg.Attachments.Add($att)
$smtp.Send($msg)
}


i get the error
[PS] C:\Windows\system32>C:\Scripts\QueueandMAilAlertonQueueThreshold2.ps1
New-PSSession : [xxx.com] Connecting to remote server xxx.com failed with the following
error message : WinRM cannot process the request. The following error occurred while using Kerberos
authentication: The computer xxx.com is unknown to Kerberos. Verify that the computer exists on the
network, that the name provided is spelled correctly, and that the Kerberos configuration for accessing the
computer is correct. The most common Kerberos configuration issue is that an SPN with the format
HTTP/xxx.com is not configured for the target. If Kerberos is not required, specify the Negotiate
authentication mechanism and resubmit the operation. For more information, see the about_Remote_Troubleshooting
Help topic.
At C:\Scripts\QueueandMAilAlertonQueueThreshold2.ps1:1 char:6
+ $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:// ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PS
   RemotingTransportException
    + FullyQualifiedErrorId : NetworkPathNotFound,PSSessionOpenFailed
Import-PSSession : Cannot validate argument on parameter 'Session'. The argument is null. Supply a non-null
argument and try the command again.
At C:\Scripts\QueueandMAilAlertonQueueThreshold2.ps1:2 char:18
+ Import-PSSession $s
+                  ~~
    + CategoryInfo          : InvalidData: (:) [Import-PSSession], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.ImportPSSessionCom
   mand
 


         Welcome to the Exchange Management Shell!

Full list of cmdlets: Get-Command
Only Exchange cmdlets: Get-ExCommand
Cmdlets that match a specific string: Help *<string>*
Get general help: Help
Get help for a cmdlet: Help <cmdlet name> or <cmdlet name> -?
Show quick reference guide: QuickRef
Exchange team blog: Get-ExBlog
Show full output for a command: <command> | Format-List

Tip of the day #45:

Forgot what the available parameters are on a cmdlet? Just use tab completion! Type:

 Set-Mailbox -<tab>

When you type a hyphen (-) and then press the TAB key, you cycle through all the available parameters on the cmdl
et. Want to narrow your search? Type part of the parameter's name and then press the TAB key. Type:

 Set-Mailbox -Prohibit<tab>

VERBOSE: Connecting to Mail.ISS.local
WARNING: Proxy creation has been skipped for the following command: 'Add-ADPermission, Add-AvailabilityAddressSpa
ce, Add-ContentFilterPhrase, Add-DatabaseAvailabilityGroupServer, Add-DistributionGroupMember, Add-FederatedDomai
n, Add-IPAllowListEntry, Add-IPAllowListProvider, Add-IPBlockListEntry, Add-IPBlockListProvider, Add-MailboxDatab
aseCopy, Add-MailboxFolderPermission, Add-MailboxPermission, Add-ManagementRoleEntry, Add-PublicFolderAdministrat
ivePermission, Add-PublicFolderClientPermission, Add-RoleGroupMember, Clean-MailboxDatabase, Clear-ActiveSyncDevi
ce, Clear-TextMessagingAccount, Compare-TextMessagingVerificationCode, Connect-Mailbox, Disable-AddressListPaging
, Disable-CmdletExtensionAgent, Disable-DistributionGroup, Disable-InboxRule, Disable-JournalRule, Disable-Mailbo
x, Disable-MailContact, Disable-MailPublicFolder, Disable-MailUser, Disable-OutlookAnywhere, Disable-OutlookProte
ctionRule, Disable-RemoteMailbox, Disable-ServiceEmailChannel, Disable-TransportAgent, Disable-TransportRule, Dis
able-UMAutoAttendant, Disable-UMIPGateway, Disable-UMMailbox, Disable-UMServer, Dismount-Database, Enable-Address
ListPaging, Enable-AntispamUpdates, Enable-CmdletExtensionAgent, Enable-DistributionGroup, Enable-ExchangeCertifi
cate, Enable-InboxRule, Enable-JournalRule, Enable-Mailbox, Enable-MailContact, Enable-MailPublicFolder, Enable-M
ailUser, Enable-OutlookAnywhere, Enable-OutlookProtectionRule, Enable-RemoteMailbox, Enable-ServiceEmailChannel,
Enable-TransportAgent, Enable-TransportRule, Enable-UMAutoAttendant, Enable-UMIPGateway, Enable-UMMailbox, Enable
-UMServer, Export-ActiveSyncLog, Export-AutoDiscoverConfig, Export-ExchangeCertificate, Export-JournalRuleCollect
ion, Export-MailboxDiagnosticLogs, Export-Message, Export-RecipientDataProperty, Export-TransportRuleCollection,
Export-UMCallDataRecord, Export-UMPrompt, Get-AcceptedDomain, Get-ActiveSyncDevice, Get-ActiveSyncDeviceAccessRul
e, Get-ActiveSyncDeviceClass, Get-ActiveSyncDeviceStatistics, Get-ActiveSyncMailboxPolicy, Get-ActiveSyncOrganiza
tionSettings, Get-ActiveSyncVirtualDirectory, Get-AddressBookPolicy, Get-AddressList, Get-AdminAuditLogConfig, Ge
t-ADPermission, Get-ADServerSettings, Get-ADSite, Get-AdSiteLink, Get-AgentLog, Get-AuthRedirect, Get-Autodiscove
rVirtualDirectory, Get-AvailabilityAddressSpace, Get-AvailabilityConfig, Get-AvailabilityReportOutage, Get-Calend
arDiagnosticLog, Get-CalendarNotification, Get-CalendarProcessing, Get-CASMailbox, Get-ClientAccessArray, Get-Cli
entAccessServer, Get-CmdletExtensionAgent, Get-Contact, Get-ContentFilterConfig, Get-ContentFilterPhrase, Get-Dat
abaseAvailabilityGroup, Get-DatabaseAvailabilityGroupNetwork, Get-DeliveryAgentConnector, Get-DetailsTemplate, Ge
t-DistributionGroup, Get-DistributionGroupMember, Get-DomainController, Get-DynamicDistributionGroup, Get-EcpVirt
ualDirectory, Get-EdgeSubscription, Get-EdgeSyncServiceConfig, Get-EmailAddressPolicy, Get-EventLogLevel, Get-Exc
hangeAssistanceConfig, Get-ExchangeCertificate, Get-ExchangeDiagnosticInfo, Get-ExchangeServer, Get-FailedContent
IndexDocuments, Get-FederatedDomainProof, Get-FederatedOrganizationIdentifier, Get-FederationInformation, Get-Fed
erationTrust, Get-ForeignConnector, Get-GlobalAddressList, Get-Group, Get-HybridConfiguration, Get-ImapSettings,
Get-InboxRule, Get-IPAllowListConfig, Get-IPAllowListEntry, Get-IPAllowListProvider, Get-IPAllowListProvidersConf
ig, Get-IPBlockListConfig, Get-IPBlockListEntry, Get-IPBlockListProvider, Get-IPBlockListProvidersConfig, Get-IRM
Configuration, Get-JournalRule, Get-LogonStatistics, Get-Mailbox, Get-MailboxAuditBypassAssociation, Get-MailboxA
utoReplyConfiguration, Get-MailboxCalendarConfiguration, Get-MailboxCalendarFolder, Get-MailboxDatabase, Get-Mail
boxDatabaseCopyStatus, Get-MailboxFolder, Get-MailboxFolderPermission, Get-MailboxFolderStatistics, Get-MailboxJu
nkEmailConfiguration, Get-MailboxMessageConfiguration, Get-MailboxPermission, Get-MailboxRegionalConfiguration, G
et-MailboxRestoreRequest, Get-MailboxRestoreRequestStatistics, Get-MailboxSentItemsConfiguration, Get-MailboxServ
er, Get-MailboxSpellingConfiguration, Get-MailboxStatistics, Get-MailContact, Get-MailPublicFolder, Get-MailUser,
 Get-ManagedContentSettings, Get-ManagedFolder, Get-ManagedFolderMailboxPolicy, Get-ManagementRole, Get-Managemen
tRoleAssignment, Get-ManagementRoleEntry, Get-ManagementScope, Get-Message, Get-MessageCategory, Get-MessageClass
ification, Get-MessageTrackingLog, Get-MessageTrackingReport, Get-MoveRequest, Get-MoveRequestStatistics, Get-Net
workConnectionInfo, Get-OabVirtualDirectory, Get-OfflineAddressBook, Get-OrganizationalUnit, Get-OrganizationConf
ig, Get-OrganizationRelationship, Get-OutlookAnywhere, Get-OutlookProtectionRule, Get-OutlookProvider, Get-OwaMai
lboxPolicy, Get-OwaVirtualDirectory, Get-PhysicalAvailabilityReport, Get-PopSettings, Get-PowerShellVirtualDirect
ory, Get-PublicFolder, Get-PublicFolderAdministrativePermission, Get-PublicFolderClientPermission, Get-PublicFold
erDatabase, Get-PublicFolderItemStatistics, Get-PublicFolderStatistics, Get-Queue, Get-ReceiveConnector, Get-Reci
pient, Get-RecipientFilterConfig, Get-RemoteDomain, Get-RemoteMailbox, Get-ResourceConfig, Get-RetentionPolicy, G
et-RetentionPolicyTag, Get-RMSTemplate, Get-RoleAssignmentPolicy, Get-RoleGroup, Get-RoleGroupMember, Get-Routing
GroupConnector, Get-RpcClientAccess, Get-SecurityPrincipal, Get-SendConnector, Get-SenderFilterConfig, Get-Sender
IdConfig, Get-SenderReputationConfig, Get-ServiceAvailabilityReport, Get-ServiceStatus, Get-SharingPolicy, Get-St
oreUsageStatistics, Get-SyncConfig, Get-SystemMessage, Get-TextMessagingAccount, Get-ThrottlingPolicy, Get-Thrott
lingPolicyAssociation, Get-TransportAgent, Get-TransportConfig, Get-TransportPipeline, Get-TransportRule, Get-Tra
nsportRuleAction, Get-TransportRulePredicate, Get-TransportServer, Get-Trust, Get-UMActiveCalls, Get-UMAutoAttend
ant, Get-UMCallDataRecord, Get-UMCallSummaryReport, Get-UMDialPlan, Get-UMHuntGroup, Get-UMIPGateway, Get-UMMailb
ox, Get-UMMailboxPIN, Get-UMMailboxPolicy, Get-UmServer, Get-User, Get-UserPrincipalNamesSuffix, Get-WebServicesV
irtualDirectory, Get-X400AuthoritativeDomain, Import-ExchangeCertificate, Import-JournalRuleCollection, Import-Re
cipientDataProperty, Import-TransportRuleCollection, Import-UMPrompt, Install-TransportAgent, Mount-Database, Mov
e-ActiveMailboxDatabase, Move-AddressList, Move-DatabasePath, Move-OfflineAddressBook, New-AcceptedDomain, New-Ac
tiveSyncDeviceAccessRule, New-ActiveSyncMailboxPolicy, New-ActiveSyncVirtualDirectory, New-AddressBookPolicy, New
-AddressList, New-AdminAuditLogSearch, New-AuthRedirect, New-AutodiscoverVirtualDirectory, New-AvailabilityReport
Outage, New-ClientAccessArray, New-DatabaseAvailabilityGroup, New-DatabaseAvailabilityGroupNetwork, New-DeliveryA
gentConnector, New-DistributionGroup, New-DynamicDistributionGroup, New-EcpVirtualDirectory, New-EdgeSubscription
, New-EdgeSyncServiceConfig, New-EmailAddressPolicy, New-ExchangeCertificate, New-FederationTrust, New-ForeignCon
nector, New-GlobalAddressList, New-HybridConfiguration, New-InboxRule, New-JournalRule, New-Mailbox, New-MailboxA
uditLogSearch, New-MailboxDatabase, New-MailboxFolder, New-MailboxRepairRequest, New-MailboxRestoreRequest, New-M
ailContact, New-MailMessage, New-MailUser, New-ManagedContentSettings, New-ManagedFolder, New-ManagedFolderMailbo
xPolicy, New-ManagementRole, New-ManagementRoleAssignment, New-ManagementScope, New-MessageClassification, New-Mo
veRequest, New-OabVirtualDirectory, New-OfflineAddressBook, New-OrganizationRelationship, New-OutlookProtectionRu
le, New-OutlookProvider, New-OwaMailboxPolicy, New-OwaVirtualDirectory, New-PublicFolder, New-PublicFolderDatabas
e, New-PublicFolderDatabaseRepairRequest, New-ReceiveConnector, New-RemoteDomain, New-RemoteMailbox, New-Retentio
nPolicy, New-RetentionPolicyTag, New-RoleAssignmentPolicy, New-RoleGroup, New-RoutingGroupConnector, New-RpcClien
tAccess, New-SendConnector, New-SharingPolicy, New-SystemMessage, New-ThrottlingPolicy, New-TransportRule, New-UM
AutoAttendant, New-UMDialPlan, New-UMHuntGroup, New-UMIPGateway, New-UMMailboxPolicy, New-WebServicesVirtualDirec
tory, New-X400AuthoritativeDomain, Remove-AcceptedDomain, Remove-ActiveSyncDevice, Remove-ActiveSyncDeviceAccessR
ule, Remove-ActiveSyncDeviceClass, Remove-ActiveSyncMailboxPolicy, Remove-ActiveSyncVirtualDirectory, Remove-Addr
essBookPolicy, Remove-AddressList, Remove-ADPermission, Remove-AuthRedirect, Remove-AutodiscoverVirtualDirectory,
 Remove-AvailabilityAddressSpace, Remove-AvailabilityReportOutage, Remove-ClientAccessArray, Remove-ContentFilter
Phrase, Remove-DatabaseAvailabilityGroup, Remove-DatabaseAvailabilityGroupNetwork, Remove-DatabaseAvailabilityGro
upServer, Remove-DeliveryAgentConnector, Remove-DistributionGroup, Remove-DistributionGroupMember, Remove-Dynamic
DistributionGroup, Remove-EcpVirtualDirectory, Remove-EdgeSubscription, Remove-EmailAddressPolicy, Remove-Exchang
eCertificate, Remove-FederatedDomain, Remove-FederationTrust, Remove-ForeignConnector, Remove-GlobalAddressList,
Remove-InboxRule, Remove-IPAllowListEntry, Remove-IPAllowListProvider, Remove-IPBlockListEntry, Remove-IPBlockLis
tProvider, Remove-JournalRule, Remove-Mailbox, Remove-MailboxDatabase, Remove-MailboxDatabaseCopy, Remove-Mailbox
FolderPermission, Remove-MailboxPermission, Remove-MailboxRestoreRequest, Remove-MailContact, Remove-MailUser, Re
move-ManagedContentSettings, Remove-ManagedFolder, Remove-ManagedFolderMailboxPolicy, Remove-ManagementRole, Remo
ve-ManagementRoleAssignment, Remove-ManagementRoleEntry, Remove-ManagementScope, Remove-Message, Remove-MessageCl
assification, Remove-MoveRequest, Remove-OabVirtualDirectory, Remove-OfflineAddressBook, Remove-OrganizationRelat
ionship, Remove-OutlookProtectionRule, Remove-OutlookProvider, Remove-OwaMailboxPolicy, Remove-OwaVirtualDirector
y, Remove-PublicFolder, Remove-PublicFolderAdministrativePermission, Remove-PublicFolderClientPermission, Remove-
PublicFolderDatabase, Remove-ReceiveConnector, Remove-RemoteDomain, Remove-RemoteMailbox, Remove-RetentionPolicy,
 Remove-RetentionPolicyTag, Remove-RoleAssignmentPolicy, Remove-RoleGroup, Remove-RoleGroupMember, Remove-Routing
GroupConnector, Remove-RpcClientAccess, Remove-SendConnector, Remove-SharingPolicy, Remove-StoreMailbox, Remove-S
ystemMessage, Remove-ThrottlingPolicy, Remove-TransportRule, Remove-UMAutoAttendant, Remove-UMDialPlan, Remove-UM
HuntGroup, Remove-UMIPGateway, Remove-UMMailboxPolicy, Remove-WebServicesVirtualDirectory, Remove-X400Authoritati
veDomain, Restore-DatabaseAvailabilityGroup, Restore-DetailsTemplate, Restore-Mailbox, Resume-MailboxDatabaseCopy
, Resume-MailboxExportRequest, Resume-MailboxRestoreRequest, Resume-Message, Resume-MoveRequest, Resume-PublicFol
derReplication, Resume-Queue, Retry-Queue, Search-AdminAuditLog, Search-MailboxAuditLog, Search-MessageTrackingRe
port, Send-TextMessagingVerificationCode, Set-AcceptedDomain, Set-ActiveSyncDeviceAccessRule, Set-ActiveSyncMailb
oxPolicy, Set-ActiveSyncOrganizationSettings, Set-ActiveSyncVirtualDirectory, Set-AddressBookPolicy, Set-AddressL
ist, Set-AdminAuditLogConfig, Set-ADServerSettings, Set-ADSite, Set-AdSiteLink, Set-AuthRedirect, Set-Autodiscove
rVirtualDirectory, Set-AvailabilityConfig, Set-AvailabilityReportOutage, Set-CalendarNotification, Set-CalendarPr
ocessing, Set-CASMailbox, Set-ClientAccessArray, Set-ClientAccessServer, Set-CmdletExtensionAgent, Set-Contact, S
et-ContentFilterConfig, Set-DatabaseAvailabilityGroup, Set-DatabaseAvailabilityGroupNetwork, Set-DeliveryAgentCon
nector, Set-DetailsTemplate, Set-DistributionGroup, Set-DynamicDistributionGroup, Set-EcpVirtualDirectory, Set-Ed
geSyncServiceConfig, Set-EmailAddressPolicy, Set-EventLogLevel, Set-ExchangeAssistanceConfig, Set-ExchangeServer,
 Set-FederatedOrganizationIdentifier, Set-FederationTrust, Set-ForeignConnector, Set-GlobalAddressList, Set-Group
, Set-HybridConfiguration, Set-ImapSettings, Set-InboxRule, Set-IPAllowListConfig, Set-IPAllowListProvider, Set-I
PAllowListProvidersConfig, Set-IPBlockListConfig, Set-IPBlockListProvider, Set-IPBlockListProvidersConfig, Set-IR
MConfiguration, Set-JournalRule, Set-Mailbox, Set-MailboxAuditBypassAssociation, Set-MailboxAutoReplyConfiguratio
n, Set-MailboxCalendarConfiguration, Set-MailboxCalendarFolder, Set-MailboxDatabase, Set-MailboxDatabaseCopy, Set
-MailboxFolderPermission, Set-MailboxJunkEmailConfiguration, Set-MailboxMessageConfiguration, Set-MailboxRegional
Configuration, Set-MailboxRestoreRequest, Set-MailboxSentItemsConfiguration, Set-MailboxServer, Set-MailboxSpelli
ngConfiguration, Set-MailContact, Set-MailPublicFolder, Set-MailUser, Set-ManagedContentSettings, Set-ManagedFold
er, Set-ManagedFolderMailboxPolicy, Set-ManagementRoleAssignment, Set-ManagementRoleEntry, Set-ManagementScope, S
et-MessageClassification, Set-MoveRequest, Set-OabVirtualDirectory, Set-OfflineAddressBook, Set-OrganizationConfi
g, Set-OrganizationRelationship, Set-OutlookAnywhere, Set-OutlookProtectionRule, Set-OutlookProvider, Set-OwaMail
boxPolicy, Set-OwaVirtualDirectory, Set-PopSettings, Set-PowerShellVirtualDirectory, Set-PublicFolder, Set-Public
FolderDatabase, Set-ReceiveConnector, Set-RecipientFilterConfig, Set-RemoteDomain, Set-RemoteMailbox, Set-Resourc
eConfig, Set-RetentionPolicy, Set-RetentionPolicyTag, Set-RoleAssignmentPolicy, Set-RoleGroup, Set-RoutingGroupCo
nnector, Set-RpcClientAccess, Set-SendConnector, Set-SenderFilterConfig, Set-SenderIdConfig, Set-SenderReputation
Config, Set-SharingPolicy, Set-SystemMessage, Set-TextMessagingAccount, Set-ThrottlingPolicy, Set-ThrottlingPolic
yAssociation, Set-TransportAgent, Set-TransportConfig, Set-TransportRule, Set-TransportServer, Set-UMAutoAttendan
t, Set-UMDialPlan, Set-UMIPGateway, Set-UMMailbox, Set-UMMailboxPIN, Set-UMMailboxPolicy, Set-UmServer, Set-User,
 Set-WebServicesVirtualDirectory, Set-X400AuthoritativeDomain, Start-DatabaseAvailabilityGroup, Start-EdgeSynchro
nization, Start-ManagedFolderAssistant, Start-RetentionAutoTagLearning, Stop-DatabaseAvailabilityGroup, Stop-Mana
gedFolderAssistant, Suspend-MailboxDatabaseCopy, Suspend-MailboxRestoreRequest, Suspend-Message, Suspend-MoveRequ
est, Suspend-PublicFolderReplication, Suspend-Queue, Test-ActiveSyncConnectivity, Test-ArchiveConnectivity, Test-
AssistantHealth, Test-CalendarConnectivity, Test-EcpConnectivity, Test-EdgeSynchronization, Test-ExchangeSearch,
Test-FederationTrust, Test-FederationTrustCertificate, Test-ImapConnectivity, Test-IPAllowListProvider, Test-IPBl
ockListProvider, Test-IRMConfiguration, Test-Mailflow, Test-MAPIConnectivity, Test-MRSHealth, Test-OrganizationRe
lationship, Test-OutlookConnectivity, Test-OutlookWebServices, Test-OwaConnectivity, Test-PopConnectivity, Test-P
owerShellConnectivity, Test-ReplicationHealth, Test-SenderId, Test-ServiceHealth, Test-SmtpConnectivity, Test-Sys
temHealth, Test-UMConnectivity, Test-WebServicesConnectivity, Uninstall-TransportAgent, Update-AddressList, Updat
e-DistributionGroupMember, Update-EmailAddressPolicy, Update-FileDistributionService, Update-GlobalAddressList, U
pdate-HybridConfiguration, Update-MailboxDatabaseCopy, Update-OfflineAddressBook, Update-PublicFolder, Update-Pub
licFolderHierarchy, Update-Recipient, Update-RoleGroupMember, Update-SafeList, Write-AdminAuditLog', because it w
ould shadow an existing local command.  Use the AllowClobber parameter if you want to shadow existing local comma
nds.
WARNING: Can't generate Export-Module for the current session using Import-PSSession.
VERBOSE: Connected to Mail.ISS.local.

[PS] C:\Windows\system32>
Avatar of timgreen7077
timgreen7077

You don't need the below cmdlets since you are connecting to exchange via remote session, so don't use the following:

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
. $env:ExchangeInstallPath\bin\RemoteExchange.ps1

Connect-ExchangeServer -auto

Also it's http://servername/PowerShell not  "https" if local.
Avatar of Member_2_6474242

ASKER

still doesnt work
Are you successfully connecting to exchange or not?
also does the authentication account you are using for Kerberos authentication in the script have permissions on the exchange server?
I am running this on exchange server and i am the domain admin. kerbros authentication may not be enabled . i will check this and get back
doesn't work
ASKER CERTIFIED SOLUTION
Avatar of timgreen7077
timgreen7077

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
worked