< Back

Install-OmsAgent

Sat Jan 18, 2020 5:48 pm

NAME Install-OmsAgent



SYNOPSIS

Installs the OMS agent on remote computers.





SYNTAX

Install-OmsAgent [[-computerName] <String[]>] [-downloadURL <String>] [-Credential <PSCredential>] [-WhatIf]

[-Confirm] [<CommonParameters>]



Install-OmsAgent [[-computerName] <String[]>] -workspaceid <String> -workspacekey <String> [-Credential

<PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>]



Install-OmsAgent [[-computerName] <String[]>] -workSpace <PSCredential> [-Credential <PSCredential>] [-WhatIf]

[-Confirm] [<CommonParameters>]



Install-OmsAgent [[-computerName] <String[]>] [-sourcePath <String>] [-Credential <PSCredential>] [-WhatIf]

[-Confirm] [<CommonParameters>]





DESCRIPTION

Either downloads the installer from a URL or copies the installer via the powershell session. Can detected if a

previous version is installed and skip if so. If allready installed WorkSpaceId and WorkSpaceKey added to previous

install. Doesn't detect invalid workspace IDs or Keys.





PARAMETERS

-computerName <String[]>



Required? false

Position? 1

Default value $env:COMPUTERNAME

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-workspaceid <String>



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-workspacekey <String>



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-workSpace <PSCredential>



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-downloadURL <String>



Required? false

Position? named

Default value

http://download.microsoft.com/download/ ... -AMD64.exe

Accept pipeline input? false

Accept wildcard characters? false



-sourcePath <String>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Credential <PSCredential>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.String





NOTES





Written by Ben Taylor

Version 1.1, 08.02.2017



-------------------------- EXAMPLE 1 --------------------------



Install-OmsAgent -sourcePath 'c:\\MMASetup-AMD64.exe' -workspaceID '<workSpaceID>' -workspaceKey '<workSpaceKey>'

-Verbose













-------------------------- EXAMPLE 2 --------------------------



Install-OmsAgent -computerName <computerName>-workspaceID '<workSpaceID>' -workspaceKey '<workSpaceKey>' -Verbose













-------------------------- EXAMPLE 3 --------------------------



PS C:\\>$workSpace = Get-Credential



Install-OmsAgent -computerName 'computerOne' -workspace $workSpace -verbose











RELATED LINKS