Answered by:
Queue viewer on Remote Edge server.

Question
-
Could you please tell me how to connect/view the remote edge server queue from one specific edge server.
Get-Queue -Server edge0000.xyz.com -Verbose
VERBOSE: [09:08:17.138 GMT] Get-Queue : Active Directory session settings for 'Get-Queue' are: View Entire Forest:
'True',
VERBOSE: [09:08:17.140 GMT] Get-Queue : Runspace context: Executing user: , Executing user organization: , Current
organization: , RBAC-enabled: Disabled.
VERBOSE: [09:08:17.141 GMT] Get-Queue : Beginning processing Get-Queue
VERBOSE: [09:08:17.142 GMT] Get-Queue : Current ScopeSet is: { Recipient Read Scope: {{, }}, Recipient Write Scopes:
{{, }}, Configuration Read Scope: {{, }}, Configuration Write Scope(s): {{, }, }, Exclusive Recipient Scope(s): {},
Exclusive Configuration Scope(s): {} }
VERBOSE: [09:08:17.145 GMT] Get-Queue : Resolved current organization: .
Get-Queue : Exchange can't connect to the RPC server on computer "edge0000.xyz.com". Verify that you used a valid
computer name.
At line:1 char:10
+ Get-Queue <<<< -Server edge0000.xyz.com -Verbose
+ CategoryInfo : InvalidOperation: (:) [Get-Queue], LocalizedException
+ FullyQualifiedErrorId : B0411D87,Microsoft.Exchange.Management.QueueViewerTasks.GetQueueInfo
VERBOSE: [09:08:17.192 GMT] Get-Queue : Ending processing Get-Queue
- Sivashankar. Please mark as answer/useful if my contribution is helpful
Wednesday, July 9, 2014 9:22 AM
Answers
-
You can do it using Powershell Remoting
- First make sure that Edge Server is configured to receive remote WSMan Connections, to do so:
From Powershell on the Edge Server run:
- Enable-PSRemoting (This will prepare the computer to receive Remote WSMan Connections)
- set-NetFirewallRule -Name WINRM-HTTP-In-TCP-PUBLIC -RemoteAddress Any (This will configure the firewall)
On Computer from where you want to connect:
- Set-Item WSMan:\localhost\Client\TrustedHosts * (this will be needed to connect to non-domain joined computers)
- $ses = New-PSSession -ComputerName <Edge fqdn> -Authentication Negotiate -Credential (get-credential -message 'Credential for Edge Server')
- Invoke-Command -Session $ses -scriptblock { PSSnapin Microsoft.Exchange.Management.Powershell.E2010 }
Now you have PSSession to the Edge Server, and you can either run command using Invoke-Command like this:
- Invoke-Command -Session $ses -scriptblock { get-queue }
Or you can Import all the command and run them as you are on the remote computer like:
- Import-PSSession -Session $ses -Prefix 'Edg' -DisableNameChecking
Now all command from the edge are available with prefix 'Edg'
for example:
- Get-EdgQueue
Hope it will help
- Proposed as answer by Angela ShiModerator Friday, July 11, 2014 3:20 AM
- Marked as answer by Angela ShiModerator Monday, July 28, 2014 8:32 AM
Wednesday, July 9, 2014 10:21 AM -
- Marked as answer by Angela ShiModerator Monday, July 28, 2014 8:32 AM
Friday, July 11, 2014 6:06 AMModerator
All replies
-
You can do it using Powershell Remoting
- First make sure that Edge Server is configured to receive remote WSMan Connections, to do so:
From Powershell on the Edge Server run:
- Enable-PSRemoting (This will prepare the computer to receive Remote WSMan Connections)
- set-NetFirewallRule -Name WINRM-HTTP-In-TCP-PUBLIC -RemoteAddress Any (This will configure the firewall)
On Computer from where you want to connect:
- Set-Item WSMan:\localhost\Client\TrustedHosts * (this will be needed to connect to non-domain joined computers)
- $ses = New-PSSession -ComputerName <Edge fqdn> -Authentication Negotiate -Credential (get-credential -message 'Credential for Edge Server')
- Invoke-Command -Session $ses -scriptblock { PSSnapin Microsoft.Exchange.Management.Powershell.E2010 }
Now you have PSSession to the Edge Server, and you can either run command using Invoke-Command like this:
- Invoke-Command -Session $ses -scriptblock { get-queue }
Or you can Import all the command and run them as you are on the remote computer like:
- Import-PSSession -Session $ses -Prefix 'Edg' -DisableNameChecking
Now all command from the edge are available with prefix 'Edg'
for example:
- Get-EdgQueue
Hope it will help
- Proposed as answer by Angela ShiModerator Friday, July 11, 2014 3:20 AM
- Marked as answer by Angela ShiModerator Monday, July 28, 2014 8:32 AM
Wednesday, July 9, 2014 10:21 AM -
- Marked as answer by Angela ShiModerator Monday, July 28, 2014 8:32 AM
Friday, July 11, 2014 6:06 AMModerator