just would like to share... it's running on windows 2008 r2 sp1.
# policy database, change password and start it
$password=Get-Date -UFormat "%A%Y%m%d%Z%M%S"
$strComputer="CHSVINFRA008"
$service="WebsensePolicyDB"
$user="WebsenseDBUser"
$admin=[adsi]("WinNT://" + $strComputer + "/$user, user")
$admin.psbase.invoke("SetPassword", $password)
$account="$strComputer\$user"
$svc=gwmi win32_service -filter "name='$service'"
$result = $svc.change($null,$null,$null,$null,$null,$false,$account,$password,$null,$null,$null)
if ($result.ReturnValue -eq '0') {write-host "Password changed"} else {write-host "Error: $result.ReturnValue"};
$svc.StartService();
# policy broker
$service="WebsensePolicyBroker"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# policy server
$service="WebsensePolicyServer"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# user service
$service="WebsenseUserService"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# filtering service
$service="Websense EIM Server"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# Triton settings DB, change password and start it
$password=Get-Date -UFormat "%A%Y%m%d%Z%M%S"
$strComputer="CHSVINFRA008"
$service="pgsqlEIP"
$user="postgres_eip"
$admin=[adsi]("WinNT://" + $strComputer + "/$user, user")
$admin.psbase.invoke("SetPassword", $password)
$account="$strComputer\$user"
$svc=gwmi win32_service -filter "name='$service'"
$result = $svc.change($null,$null,$null,$null,$null,$false,$account,$password,$null,$null,$null)
if ($result.ReturnValue -eq '0') {write-host "Password changed"} else {write-host "Error: $result.ReturnValue"};
$svc.StartService();
# triton web security
$service="WebsenseManagerTomcat"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# Triton Unified
$service="EIPManager"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# triton server
$service="EIPManagerProxy"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# control service
$service="WebsenseControlService"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# dc agent
$service="WebsenseDCAgent"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# explorer
$service="WebsenseWFReportServer"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# information
$service="WebsenseCommunicationAgent"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# log server
$service="WebsenseLogServer"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# network agent
$service="Websense Network Agent"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# reporter scheduler
$service="Websense Reporter Scheduler"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# rtm db
$service="WebsenseRtmDb"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# rtm client
$service="WebsenseRtmTomcat"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# rtm server
$service="WebsenseRTM"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# usage monitor
$service="WebsenseUsageMonitor"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();
# web reporting tools
$service="Apache2Websense"
$svc=gwmi win32_service -filter "name='$service'"
$svc.StartService();