Quantcast
Channel: Exchange Server 2010 forum
Viewing all articles
Browse latest Browse all 15005

Syntax problem using Management Shell

$
0
0

I made the mistake of naming my server cchn-sbs2011.
Commands from the Exchange Management Shell return errors because of the hyphen in the server name

Here are the commands I ran:

1st command run

Set-ReceiveConnector -Identity ($Env:CCHN-SBS2011 + "\Windows SBS Fax Sharepoint Receive " + $Env:CCHN-SBS2011) -DefaultDomain $Env:UserDNSDomain

I get the following:

>>You must provide a value expression on the right-hand side of the "-" operator.

I THINK THE PROBLEM IS: It sees the "-" in CCHN-SBS2011 as asking for an operator

Or I run the command with ""

2nd command run

Set-ReceiveConnector -Identity ("$Env:CCHN-SBS2011" + "\Windows SBS Fax Sharepoint Receive " + "$Env:CCHN-SBS2011") -DefaultDomain $Env:UserDNSDomain

I get the following:

>>The operation couldn't be performed because object '-SBS2011\Windows SBS Fax Sharepoint Receive -SBS2011' couldn't be found on 'CCHN-SBS2011.cchn.local'.

I THINK THE PROBLEM IS: It thinks SBS2011 is an operator

I have also tried using variables, but it just duplicates the same as explained above.

DOES ANYONE KNOW SOME SYNTAX OR A CLEVER WAY AROUND THIS MESS.


Viewing all articles
Browse latest Browse all 15005

Trending Articles