Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Script to update SEP 12.1 installation packages

Created: 26 Jun 2012 • Updated: 27 Jun 2014 | 16 comments
Zebbelin's picture
+14 14 Votes
Login to vote

*Update available*

Hi,

I wrote a little Powershell script to update existing SEP 12.1 Installation Packages with the latest definitions for all modules.

Instructions:

On the SEPM 12.1 share the following folder for “everyone – read”

Export Packages without ticking the box “Create a single .EXE file for this package”

Ensure that the following .ZIP files exist in the 32Bit and 64Bit package folder:

Download the script and the modify the first lines for your environment

#Needs to be modified for each environment:
$SEPM         = "SEPM.mycompany.local"
$content    = "\content$"
$x86Setup    = "C:\SEP\My Company_Workstations_WIN32BIT\Symantec Endpoint Protection version 12.1.1101.401\"
$x64Setup    = "C:\SEP\My Company_Workstations_WIN64BIT\Symantec Endpoint Protection version 12.1.1101.401\"

The first two lines are for the SEPM Server name and the share of the content

The last two lines are the folders where your packages are stored. Save the script as .ps1

 

Now you can run the script and it will update the definition files in your package folders:

Packages are now up to date!

If you want to only update the Virus Definitions or only 32Bit / 64Bit Packages, you can delete the related lines in the "#Execution Sequence:" Part of the script.

Important Note: Do not run the script when liveupdate is installing new definitions on the SEP. This may damage your exported packages.

- Zebbelin

*Update*

Finally I managed to update the script :-)

Instructions for V0.2:

On the SEPM 12.1 share the following folder for “everyone – read”

Export Packages without ticking the box “Create a single .EXE file for this package”

Download the script and the modify the first lines for your environment:

#Needs to be modified for your environment:
$SEPM         = "SEPM.mycompany.local"
$content      = "\content$"
$Installers   = "C:\SEP12\"

The first two Variables are for the SEPM Server name and the share of the content

The third Variable is the Folder where you store the Packages you want to update. Save the script as .ps1

FolderStrukture.PNG

Now you can run the script and it will update the definition files in your package folders:

Script_output.PNG

Important Note: Do not run the script when liveupdate is installing new definitions on the SEP. This may damage your exported packages.

Improvements:

  • You don´t need to specify separate Variables for the x64 and x86 Packages anymore. The script will search for Installers in the $Installers Variable
  • You can update multiple packages with one script.
  • The Script will only update definition files that exist in the Packages folder
  • Includes all definition types based on the ContentInfo.txt for SEPM12.1.4

Cheers,

- Zebbelin

 

 

Comments 16 CommentsJump to latest comment

AshMelwani's picture

Thanks very Good.

One question I have packages for servers also so shall i add the lines for the server package below the workstations

0
Login to vote
Zebbelin's picture

Good Point. Will add that in the next Version of the Script!

In the meantime you can change the "$x86Setup" and "$x64Setup" variable to the path of your server package and remove in the "Execution Sequence" part the definitions you don´t need (e.g. "NetworkThreat")

0
Login to vote
Ian_C.'s picture

Nicely done.

Some features for v0.2 or beyond (in no particular order)

  • Looking at our v11 installation, this script can easily be converted to v11 or use a parameter to specify the version. I've attached ContentInfo.txt from our install that lists the relevant GUIDs
  • You copy the definition file, regardless of its existance. Maybe build in an IF EXIST clause (e.g. IF EXIST VDefs.zip THEN COPY, ELSE DON'T COPY). This would also not require the use to edit the script further down, below the parameter section
  • A publish date in yur header would be good.
  • Too me it feels like the architecture options (AMD64 & x86) are hard coded. Can that be made into a variable or parameter?

Keep up the good work.

AttachmentSize
ContentInfo.txt 1.36 KB
Please mark the post that best solves your problem as the answer to this thread.
0
Login to vote
Zebbelin's picture

Thanks Ian. smiley

The IF EXIST is a very good tip enlightened

Unfortunately I don´t have a SEPM 11 anymore. If I find the time I´ll set one up and test the script there with your ContentInfo File.

Not sure what you mean with making the architecture a variable. I´ve stored the AMD64 and x86 setup packages on a share and update them on a regularly basis. Therefore I always update both architectures.

0
Login to vote
Ian_C.'s picture

Currently, you have two execution blocks starting with the comments '#Copy x64 Defs' and '#Copy x86 Defs'

Both blocks do exactly the same thing, just the $osArch is different

I'm saying that it should be possible to create one block that performs the copy function with lines similar to

CopyDefs $VirusDefinitions$osArch VDefs.zip $osArch

I believe that this would help remove duplicate code; i.e. move from two copy code blocks down to 1 copy block.

Hey, right now your script works & that's great. Keep is like that for now.

My suggestions are for long term maintainability & reducing COPY/PASTE editing later on.

Please mark the post that best solves your problem as the answer to this thread.
0
Login to vote
RSingh1's picture

Good Artical

 

Very helpfull artical.

0
Login to vote
MaRRuT@CC's picture

good work! Keep it up for later releases.

0
Login to vote
Jackie007's picture

hi,

Good Script...............

Thanks....

Don't forget to mark your thread as 'SOLVED' with the answer that best helped you

0
Login to vote
rs_cert's picture

Looking the script for 11.x. Any help on same.

0
Login to vote
consoleadmin's picture

Nice Script.

Thanks.

0
Login to vote
njharris's picture

Zebbelin,

Great script buddy! Just thought I'd let you know that with the release of 12.1.2 there are 2 additional definition zipfiles that are included in exported packages now. I talked to support and obtained the monikers that relate to them. They are:

ApPortalDefs.zip - {50B092DE-40D5-4724-971B-D3D90E9EE987}

EFAVTDefs.zip - {E8827B4A-4F58-4dea-8C93-07B32A63D1C5}

I had to add these to the Variables section and incorporate them into the "Copy x64 Defs" and "Copy x86 Defs" sections. These 2 files are bit independant so both will be used in both package types.

On another note, upon obtaining this moniker info from support, they made it extremely clear that they do not support this method of updating exported packages. If there are any problems seen from this method they prefer that the package be manually exported.

This is a great script and has helped introduce me to PowerShell.

Thanks again!

0
Login to vote
Zack123's picture

Wonderful script and extremly useful, thank you for sharing.

The only change i made was to IronDefs.zip moniker to equal the below

$SubmissionControl 	= "{263395A0-D3D8-4be4-80B5-202C94EF4AA0}"
0
Login to vote
njharris's picture

Zack123,

After second glance it does look like you are correct! Thanks for posting! Anything specific lead you to find this or were you just double-checking all monikers?

Thanks!

0
Login to vote
Zebbelin's picture

Finally I managed to create an updated Version of the script.

Thanks again for all your input! smiley

0
Login to vote