Sie sind auf Seite 1von 2

Win_SAPHostAgentUpdate_Push.

ps1
Wednesday, May 03, 2017 6:09 PM

.SYNOPSIS
Upgrade of SAP Host Agent using the "new" directory as per note 1473974
Script Location:
\\hqsap00078.nestle.com\mastercopy\scripts\Win_SAPHostagentUpdate_Push.ps1
Syntax:
Win_SAPHostAgentUpdate_Push.ps1 -Action { Check-HostAgentVersion | Patch-HostAgent } -Computer "TargetHostname" -SAPHostAgentSource
"//Directory/of/Host/Agent/Patch"

Parameters:
-Computer “Hostname”
Contains the name(s) of the target host. Defaults to "localhost". Cannot be used together with -ComputerList. Multiple comma separated entries can be used.

-ComputerList “"//Full/Path/to/Computerlist"
Not to be used by OO. Cannot be used with -Computer

-SAPHostAgentSource "//Directory/of/Host/Agent/Patch"
Contains the source of the host agent path.
Default="\\hqsap00078.nestle.com\mastercopy\MII\HostAgent_Package"

-Action Check-HostAgentVersion
Checks the Kernel and Patch number of the Host agent based on the ComputerList given

-Action Patch-HostAgent
Patches the Host Agent based on the ComputerList

.NOTES
1. Script can be run centrally on any Windows Server *of the same Domain*. Executing Server should have file share access to Wi ndows Mastercopy and target servers
2. ComputerList will not be used by OO. Instead parallel execution will be handled natively by OO.

.EXAMPLE

Example 1
Version Check of multiple severs

PS C:\Users\adm2buzon\Desktop> .\Win_SAPHostagentUpdate_Push.ps1 -Action Check-HostAgentVersion


Transcript started, output file is F:\usr\sap\Globe\Temp\Win_SAPHostagentUpdate_Push.ps1_2017-05-03_10_08_50.log
Host j3lsap.nestle.com has kernel make variant 721_REL, and patch number 24
Host j3osap.nestle.com has kernel make variant 721_REL, and patch number 24
Host j3psap.nestle.com has kernel make variant 720_REL, and patch number 190
Host j3jsap.nestle.com has kernel make variant 720_REL, and patch number 190
Host j3gsap.nestle.com has kernel make variant 720_REL, and patch number 190

Example 2
Patch of one server j3psap.nestle.com

PS C:\Users\adm2buzon\Desktop> .\Win_SAPHostagentUpdate_Push.ps1 -Action Patch-HostAgent -Computer "j3psap.nestle.com"


Transcript started, output file is F:\usr\sap\Globe\Temp\Win_SAPHostagentUpdate_Push.ps1_2017-05-03_10_34_57.log
***********************************************
Manually creating the NEW directory on j3psap.nestle.com

Directory: \\j3psap.nestle.com\C$\Program Files\SAP\hostctrl

Mode LastWriteTime Length Name


---- ------------- ------ ----
d---- 5/3/2017 10:34 AM new
Creating the execution lock on j3psap.nestle.com
Transfering files to j3psap.nestle.com
Removing the execution lock on j3psap.nestle.com
***********************************************
Rerun the script after 5 mintues with Action=Check-SMDVersion to check the SMD Version

Summary: There are 0 error(s) in the execution.


Transcript stopped, output file is F:\usr\sap\Globe\Temp\Win_SAPHostagentUpdate_Push.ps1_2017-05-03_10_34_57.log

Example 3
Checking of a single server by selectively setting the ComputerList to just contain j3psap.nestle.com

Nestle Page 1
PS C:\Users\adm2buzon\Desktop> .\Win_SAPHostagentUpdate_Push.ps1 -Action Check-HostAgentVersion
Transcript started, output file is F:\usr\sap\Globe\Temp\Win_SAPHostagentUpdate_Push.ps1_2017-05-03_10_39_48.log
Host j3psap.nestle.com has kernel make variant 721_REL, and patch number 24

OO Workflow Requirements OPR.MON.01 AUTO Solman Monitoring and Alerting (Automated Host Agent Update) (Vers. 1.0)
http://ecm.ctr.nestle.com/globelib/drl/objectId/0900f3d3820e31eb

OO Workflow Test Cases OPR.MON.01 AUTO Automated Host Agent Update (Vers. 1.0)
http://ecm.ctr.nestle.com/globelib/drl/objectId/0900f3d3820e3760

Nestle Page 2

Das könnte Ihnen auch gefallen