Link to home
Start Free TrialLog in
Avatar of bradbritton
bradbritton

asked on

Anti-Spam Powershell Script Error

I keep getting this error when I try and run the antiSpam powershell on my exchange server.
--------
PS C:\program files\microsoft\exchange server\scripts> ./install-antispamagents.ps1
Get-ItemProperty : Cannot find path 'HKLM:\SOFTWARE\Microsoft\Exchange\v8.0\Setup' because it does not exist.
At C:\program files\microsoft\exchange server\scripts\install-AntispamAgents.ps1:24 char:33
+ $InstallPath = (get-itemproperty <<<<  HKLM:\SOFTWARE\Microsoft\Exchange\v8.0\Setup).MSiInstallPath + "TransportRoles\agents\
"
    + CategoryInfo          : ObjectNotFound: (HKLM:\SOFTWARE\...ange\v8.0\Setup:String) [Get-ItemProperty], ItemNotFoundExcep
   tion
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand
 
The term 'get-transportserver' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
 spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\program files\microsoft\exchange server\scripts\install-AntispamAgents.ps1:30 char:39
+ $transportserver = get-transportserver <<<<  -id $localservername
    + CategoryInfo          : ObjectNotFound: (get-transportserver:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
 
Failed to find the transport server : cgsrvm-ex02
----------
Any ideas?
Avatar of Manpreet SIngh Khatra
Manpreet SIngh Khatra
Flag of India image

Does this server have Exchange installed on it ?

- Rancy
Are you running the script from Exchange Management Shell?
Install antispam agents from your hub Transport Server.. Appears like you are running that from different server

http://support.microsoft.com/kb/555924
Avatar of bradbritton
bradbritton

ASKER

Would the transport serve be the SMTP bridgehead?
If you run get-transportserver command in Exchange Management Shell, then it will list the Transport Servers from your environment..
ASKER CERTIFIED SOLUTION
Avatar of Rajkumar Duraisamy
Rajkumar Duraisamy
Flag of India image

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