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.p s1
Get-ItemProperty : Cannot find path 'HKLM:\SOFTWARE\Microsoft\ Exchange\v 8.0\Setup' because it does not exist.
At C:\program files\microsoft\exchange server\scripts\install-Ant ispamAgent s.ps1:24 char:33
+ $InstallPath = (get-itemproperty <<<< HKLM:\SOFTWARE\Microsoft\E xchange\v8 .0\Setup). MSiInstall Path + "TransportRoles\agents\
"
+ CategoryInfo : ObjectNotFound: (HKLM:\SOFTWARE\...ange\v8 .0\Setup:S tring) [Get-ItemProperty], ItemNotFoundExcep
tion
+ FullyQualifiedErrorId : PathNotFound,Microsoft.Pow erShell.Co mmands.Get ItemProper tyCommand
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-Ant ispamAgent s.ps1:30 char:39
+ $transportserver = get-transportserver <<<< -id $localservername
+ CategoryInfo : ObjectNotFound: (get-transportserver:Strin g) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Failed to find the transport server : cgsrvm-ex02
----------
Any ideas?
--------
PS C:\program files\microsoft\exchange server\scripts> ./install-antispamagents.p
Get-ItemProperty : Cannot find path 'HKLM:\SOFTWARE\Microsoft\
At C:\program files\microsoft\exchange server\scripts\install-Ant
+ $InstallPath = (get-itemproperty <<<< HKLM:\SOFTWARE\Microsoft\E
"
+ CategoryInfo : ObjectNotFound: (HKLM:\SOFTWARE\...ange\v8
tion
+ FullyQualifiedErrorId : PathNotFound,Microsoft.Pow
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-Ant
+ $transportserver = get-transportserver <<<< -id $localservername
+ CategoryInfo : ObjectNotFound: (get-transportserver:Strin
+ FullyQualifiedErrorId : CommandNotFoundException
Failed to find the transport server : cgsrvm-ex02
----------
Any ideas?
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
http://support.microsoft.com/kb/555924
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
- Rancy