Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
MIM PAM - Service and Portal PAM Install
@ECHO OFF
REM ********************************************
REM Environment Parameters
ECHO Setting Environment Parameters...
REM ********************************************
SET MSIROOTFOLDER=D:
SET MSILOCATION=%MSIROOTFOLDER%\Service and Portal
SET MSIFILENAME=Service and Portal.msi
SET LOGFILENAME=C:\Temp\%MSIFILENAME%-%time:~0,2%_%time:~3,2%_%time:~6,2%.log
REM ********************************************
REM Networking Parameters
ECHO Setting Networking Parameters...
REM ********************************************
SET MACHINENAME=%COMPUTERNAME%
SET DOMAINNAME=priv
IF "%1" neq "" SET DOMAINNAME=%1
SET DOMAIN_SUFFIX=oholics.net
SET ADMIN_USER=MIMService
SET SYNC_ADMIN=MIMMA
SET ADMIN_PASS=YourMIMServicePassword
SET FEATURES_TO_INSTALL=CommonServices,WebPortals,PAMServices
SET REBOOT=ReallySuppress
SET SQMOPTINSETTING=1
SET ACCEPT_EULA=1
SET FIREWALL_CONF=1
REM ********************************************
REM SharePoint Parameters
ECHO Setting SharePoint Parameters...
REM ********************************************
SET SHAREPOINTUSERS_CONF=1
SET SHAREPOINT_URL=http://mimpam.priv.oholics.net:82
IF "%2" neq "" SET SHAREPOINT_URL=%2
REM ********************************************
REM Registration Portal Parameters
ECHO Setting Registration Portal Parameters...
REM ********************************************
SET REGISTRATION_PORTAL_URL=http://localhost:8080
REM ********************************************
REM REST Parameters
ECHO Setting REST Parameters...
REM ********************************************
SET MIMPAM_REST_API_PORT=8086
REM ********************************************
REM PAM Monitoring Service Parameters
ECHO Setting PAM Monitoring Service Parameters...
REM ********************************************
SET PAM_MONITORING_SERVICE_ACCOUNT_DOMAIN=%DOMAINNAME%
SET PAM_MONITORING_SERVICE_ACCOUNT_NAME=MIMMonitor
SET PAM_MONITORING_SERVICE_ACCOUNT_PASSWORD=YourMIMMonitorPassword
REM ********************************************
REM PAM Component Service Parameters
ECHO Setting PAM Component Service Parameters...
REM ********************************************
SET PAM_COMPONENT_SERVICE_ACCOUNT_DOMAIN=%DOMAINNAME%
SET PAM_COMPONENT_SERVICE_ACCOUNT_NAME=MIMComponent
SET PAM_COMPONENT_SERVICE_ACCOUNT_PASSWORD=YourMIMComponentPassword
REM ********************************************
REM PAM REST API App Pool Parameters
ECHO Setting PAM REST API App Pool Parameters...
REM ********************************************
SET PAM_REST_API_APPPOOL_ACCOUNT_DOMAIN=%DOMAINNAME%
SET PAM_REST_API_APPPOOL_ACCOUNT_NAME=MimSharePointSvc
SET PAM_REST_API_APPPOOL_ACCOUNT_PASSWORD=YourMimSharePointSvcPassword
REM ********************************************
REM Preparing the setup parameters
ECHO Preparing the setup parameters...
REM ********************************************
SET COMMAND=MSIEXEC /i "%MSILOCATION%\%MSIFILENAME%" SQMOPTINSETTING=%SQMOPTINSETTING% MAIL_SERVER="%MACHINENAME%" ^
SQLSERVER_SERVER="%MACHINENAME%" SERVICE_ACCOUNT_NAME="%ADMIN_USER%" SERVICE_ACCOUNT_PASSWORD="%ADMIN_PASS%" ^
SERVICE_ACCOUNT_DOMAIN="%DOMAINNAME%" SERVICE_ACCOUNT_EMAIL="%ADMIN_USER%@%DOMAINNAME%.%DOMAIN_SUFFIX%" ^
RUNNING_USER_EMAIL="%ADMIN_USER%@%DOMAINNAME%.%DOMAIN_SUFFIX%" SYNCHRONIZATION_SERVER_ACCOUNT="%DOMAINNAME%\%SYNC_ADMIN%" ^
SYNCHRONIZATION_SERVER="%MACHINENAME%" SERVICEADDRESS="%MACHINENAME%" SHAREPOINTUSERS_CONF=%SHAREPOINTUSERS_CONF% ^
REGISTRATION_PORTAL_URL="%REGISTRATION_PORTAL_URL%" SHAREPOINT_URL="%SHAREPOINT_URL%" ADDLOCAL="%FEATURES_TO_INSTALL%" ^
PAM_MONITORING_SERVICE_ACCOUNT_DOMAIN=%PAM_MONITORING_SERVICE_ACCOUNT_DOMAIN% ^
PAM_MONITORING_SERVICE_ACCOUNT_NAME=%PAM_MONITORING_SERVICE_ACCOUNT_NAME% PAM_MONITORING_SERVICE_ACCOUNT_PASSWORD=%PAM_MONITORING_SERVICE_ACCOUNT_PASSWORD% ^
PAM_COMPONENT_SERVICE_ACCOUNT_DOMAIN=%PAM_COMPONENT_SERVICE_ACCOUNT_DOMAIN% PAM_COMPONENT_SERVICE_ACCOUNT_NAME=%PAM_COMPONENT_SERVICE_ACCOUNT_NAME% ^
PAM_COMPONENT_SERVICE_ACCOUNT_PASSWORD=%PAM_COMPONENT_SERVICE_ACCOUNT_PASSWORD% PAM_REST_API_APPPOOL_ACCOUNT_DOMAIN=%PAM_REST_API_APPPOOL_ACCOUNT_DOMAIN% ^
PAM_REST_API_APPPOOL_ACCOUNT_NAME=%PAM_REST_API_APPPOOL_ACCOUNT_NAME% PAM_REST_API_APPPOOL_ACCOUNT_PASSWORD=%PAM_REST_API_APPPOOL_ACCOUNT_PASSWORD% ^
ACCEPT_EULA=%ACCEPT_EULA% MIMPAM_REST_API_PORT=%MIMPAM_REST_API_PORT% FIREWALL_CONF=%FIREWALL_CONF% REBOOT="%REBOOT%" /l*v "%LOGFILENAME%" /quiet
REM ********************************************
REM Running the installation
ECHO Running the installation ...
REM ********************************************
ECHO %COMMAND%
%COMMAND%
ECHO EXIT CODE: %ERRORLEVEL%
REM ********************************************
REM Finished
ECHO Finished
REM ********************************************
EXIT /B %ERRORLEVEL%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment