Created
July 6, 2021 04:16
-
-
Save ebibibi/86e2aa83fc2c07ed3fcd2a6efc857a1d to your computer and use it in GitHub Desktop.
sample code for install MMA agent to windows server silently
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[Parameter(mandatory=$true)] $MMAInstallerURI, | |
[Parameter(mandatory=$true)] $WorkSpaceID, | |
[Parameter(mandatory=$true)] $Key | |
) | |
#donwload | |
Invoke-WebRequest -UseBasicParsing -URI $MMAInstallerURI -OutFile .\MMASetup-AMD64.exe | |
#extract | |
.\MMASetup-AMD64.exe /c /t:c:\mmasetup | |
#install | |
c:\mmasetup\setup.exe /qn NOAPM=1 ADD_OPINSIGHTS_WORKSPACE=1 OPINSIGHTS_WORKSPACE_AZURE_CLOUD_TYPE=0 OPINSIGHTS_WORKSPACE_ID="$WorkSpaceID" OPINSIGHTS_WORKSPACE_KEY="$Key" AcceptEndUserLicenseAgreement=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment