├── .gitignore
├── 1.ScheduleDownloads.xml
├── 3.ScheduleEmail.xml
├── Configs
├── email_configs.xml
└── mdt_configs.xml
├── Download3rdSoftware.bat
├── Get-3rdPartySoftware.ps1
├── README.md
└── SendEmail-3rdPartySoftware.ps1
/.gitignore:
--------------------------------------------------------------------------------
1 | Software
2 | Logs
3 | Tools
4 | access.txt
5 |
--------------------------------------------------------------------------------
/1.ScheduleDownloads.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PowerShellCrack/PSThirdPartyAppsManager/8fb5a64fc1ada219cc72a8c6b15e9009d7149041/1.ScheduleDownloads.xml
--------------------------------------------------------------------------------
/3.ScheduleEmail.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PowerShellCrack/PSThirdPartyAppsManager/8fb5a64fc1ada219cc72a8c6b15e9009d7149041/3.ScheduleEmail.xml
--------------------------------------------------------------------------------
/Configs/email_configs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 |
5 |
6 | internal
7 |
8 | Downloaded 3rd Party Software and Updates
9 |
10 |
11 | mail.contoso.com
12 | 25
13 | True
14 | service@contoso.com
15 | firstemail@contoso.com,secondemail@contoso.com
16 | ExchCreds.xml
17 |
18 |
19 |
20 | smtp.gmail.com
21 | 587
22 | yourgmail@gmail.com
23 | yourgmailpassword
24 | True
25 | yourgmail@gmail.com
26 | yourgmail@gmail.com
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Configs/mdt_configs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | mdt.contoso.com
5 | deploymentshare$
6 | D:\DeploymentShare
7 | False
8 |
9 | Configs\MDTCreds.xml
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Download3rdSoftware.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | powershell -ExecutionPolicy bypass -file "%~dp0Get-3rdPartySoftware.ps1"
--------------------------------------------------------------------------------
/Get-3rdPartySoftware.ps1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PowerShellCrack/PSThirdPartyAppsManager/8fb5a64fc1ada219cc72a8c6b15e9009d7149041/Get-3rdPartySoftware.ps1
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 3rd Party Software Downloader
2 |
3 | ## Description
4 | - Powershell script to download the latest 3rd party software
5 |
6 | ## Tags
7 | - msi
8 | - vlc-player
9 | - firefox
10 | - adobe-reader
11 | - chrome
12 | - powershell-script
13 | - google-chrome
14 | - downloader
15 | - 7zip
16 | - google-chrome-stable
17 | - powershell
18 | - third-party
19 | - java
20 | - sccm
21 | - mdt
22 | - mdt-automation-project
23 |
24 |
25 | ## Project:
26 | - This is part of my MDT/SCCM automation Project
27 |
28 | ## What it does:
29 | The script crawls through the 3rd party websites, looking for specific tags in the html and auto navigates to find the download link. Then it will download the files and store them in a folder. Once downloaded, it will build a Cixml that can be imported with another script (https://github.com/PowerShellCrack/MDTApplicationUpdater) to automaticaly updates MDT.
30 |
31 | ## Works on:
32 | - Currently it only updates wsf files (https://github.com/PowerShellCrack/MDTDeployApplications)
33 | - NOTE: The wsf file must contain the variable: sVersion
34 |
35 | ## Supports:
36 | - Adobe Reader
37 | - Adobe Reader Updates (and MUI)
38 | - Adobe Acrobat Reader DC Updates (and MUI)
39 | - Flash Player Active X
40 | - Flash Player NPAPI (Firefox)
41 | - Flash Player PPAPI (Chrome)
42 | - Shockwave (full, slim and msi)
43 | - Google Chrome Enterprise Edition (msi)
44 | - Google Chrome Standalone (exe)
45 | - Firefox (x86)
46 | - Firefox (x64)
47 | - Notepadd++ (x86)
48 | - Notepadd++ (x64)
49 | - 7Zip (x64) - MSI and EXE
50 | - 7Zip (x86) - MSI and EXE
51 | - VLC Player (x64)
52 | - VLC Player (x86)
53 | - Java 8 (x86)
54 | - Java 8 (x64)
55 |
--------------------------------------------------------------------------------
/SendEmail-3rdPartySoftware.ps1:
--------------------------------------------------------------------------------
1 | <#
2 | .INFO
3 | Script: SendEmail-3rdPartySoftware.ps1
4 | Author: Richard Tracy
5 | Email: richard.tracy@hotmail.com
6 | Twitter: @rick2_1979
7 | Website: www.powershellcrack.com
8 | Last Update: 07/15/2019
9 | Version: 1.0.0
10 |
11 | .DISCLOSURE
12 | THE SCRIPT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
13 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. BY USING OR DISTRIBUTING THIS SCRIPT, YOU AGREE THAT IN NO EVENT
14 | SHALL THE AUTHOR OR ANY AFFILATES BE HELD LIABLE FOR ANY DAMAGES WHATSOEVER RESULTING FROM USING OR DISTRIBUTION OF THIS SCRIPT, INCLUDING,
15 | WITHOUT LIMITATION, ANY SPECIAL, CONSEQUENTIAL, INCIDENTAL OR OTHER DIRECT OR INDIRECT DAMAGES. BACKUP UP ALL DATA BEFORE PROCEEDING.
16 |
17 | .SYNOPSIS
18 | Sends an email of 3rd party Software and updates from list generated
19 |
20 | .DESCRIPTION
21 | Imports list generated by Get-3rdPartySoftware.ps1 and emails it and formats it as table
22 |
23 | .PARAMETER SoftwareList
24 | REQUIRED: Specified path to software list
25 |
26 | .PARAMETER ConfigPath
27 | Specified path to alternate config file. Defaults to relative path of script under Config folder
28 |
29 | .PARAMETER SMTPServer
30 | NAMED SMTP. Specify basic SMTP server (usally exchange). Use config for more detail
31 |
32 | .PARAMETER From
33 | NAMED SMTP Specify from receipent when using SMTPServer param
34 |
35 | .PARAMETER To
36 | NAMED SMTP. Specify to receipent when using SMTPServer param> Use array for mutlple. EG: @("user1@domain", "user2@domain")
37 |
38 | .EXAMPLE
39 | powershell.exe -file "SendEmail-3rdPartySoftware.ps1" -SoftwareList D:\3rdPartySoftware\softwarelist.xml
40 |
41 | powershell.exe -file "SendEmail-3rdPartySoftware.ps1" -ConfigPath D:\Configs\email.xml -SoftwareList D:\3rdPartySoftware\softwarelist.xml
42 |
43 | powershell.exe -file "SendEmail-3rdPartySoftware.ps1" -SoftwareList D:\3rdPartySoftware\softwarelist.xml -SMSTServer mail.mydomain.local -From me@mydomain.local-To friend1@mydomain.local
44 |
45 | .NOTES
46 | This script is meant to be scheduled or chained with Get-3rdPartySoftware.ps1 script. Use the Schedule exposrt to build a chain task schudule.
47 | Using the config is more advanced than the params. Read the config comment sfor more info.
48 |
49 | .LINK
50 |
51 | .CHANGE LOG
52 | 1.0.0 - Jul 15, 2019 - initial
53 | #>
54 | ##*===========================================================================
55 | ##* PARAMS
56 | ##*===========================================================================
57 | [CmdletBinding(DefaultParameterSetName='Null')]
58 | param (
59 | [Parameter(ParameterSetName='Config', Mandatory=$true)]
60 | [string]$ConfigPath,
61 |
62 | [Parameter(Mandatory=$true)]
63 | [string]$SoftwareList,
64 |
65 | [Parameter(ParameterSetName='SMTP', Mandatory=$true)]
66 | [string]$SMTPServer,
67 |
68 | [Parameter(ParameterSetName='SMTP',Mandatory=$false)]
69 | [string]$From = 'mdt@localhost',
70 |
71 | [Parameter(ParameterSetName='SMTP',Mandatory=$true)]
72 | [string[]]$To
73 | )
74 |
75 | #==================================================
76 | # FUNCTIONS
77 | #==================================================
78 | Function Test-IsISE {
79 | # try...catch accounts for:
80 | # Set-StrictMode -Version latest
81 | try {
82 | return ($null -ne $psISE);
83 | }
84 | catch {
85 | return $false;
86 | }
87 | }
88 |
89 | Function Get-ScriptPath {
90 | # Makes debugging from ISE easier.
91 | if ($PSScriptRoot -eq "")
92 | {
93 | if (Test-IsISE)
94 | {
95 | $psISE.CurrentFile.FullPath
96 | #$root = Split-Path -Parent $psISE.CurrentFile.FullPath
97 | }
98 | else
99 | {
100 | $context = $psEditor.GetEditorContext()
101 | $context.CurrentFile.Path
102 | #$root = Split-Path -Parent $context.CurrentFile.Path
103 | }
104 | }
105 | else
106 | {
107 | #$PSScriptRoot
108 | $PSCommandPath
109 | #$MyInvocation.MyCommand.Path
110 | }
111 | }
112 |
113 |
114 | Function Format-DatePrefix {
115 | [string]$LogTime = (Get-Date -Format 'HH:mm:ss.fff').ToString()
116 | [string]$LogDate = (Get-Date -Format 'MM-dd-yyyy').ToString()
117 | return ($LogDate + " " + $LogTime)
118 | }
119 |
120 | Function Write-LogEntry {
121 | param(
122 | [Parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]
123 | [ValidateNotNullOrEmpty()]
124 | [string]$Message,
125 | [Parameter(Mandatory=$false,Position=2)]
126 | [string]$Source = '',
127 | [parameter(Mandatory=$false)]
128 | [ValidateSet(0,1,2,3,4)]
129 | [int16]$Severity,
130 |
131 | [parameter(Mandatory=$false, HelpMessage="Name of the log file that the entry will written to")]
132 | [ValidateNotNullOrEmpty()]
133 | [string]$OutputLogFile = $Global:LogFilePath,
134 |
135 | [parameter(Mandatory=$false)]
136 | [switch]$Outhost
137 | )
138 | Begin{
139 | [string]$LogTime = (Get-Date -Format 'HH:mm:ss.fff').ToString()
140 | [string]$LogDate = (Get-Date -Format 'MM-dd-yyyy').ToString()
141 | [int32]$script:LogTimeZoneBias = [timezone]::CurrentTimeZone.GetUtcOffset([datetime]::Now).TotalMinutes
142 | [string]$LogTimePlusBias = $LogTime + $script:LogTimeZoneBias
143 |
144 | }
145 | Process{
146 | # Get the file name of the source script
147 | Try {
148 | If ($script:MyInvocation.Value.ScriptName) {
149 | [string]$ScriptSource = Split-Path -Path $script:MyInvocation.Value.ScriptName -Leaf -ErrorAction 'Stop'
150 | }
151 | Else {
152 | [string]$ScriptSource = Split-Path -Path $script:MyInvocation.MyCommand.Definition -Leaf -ErrorAction 'Stop'
153 | }
154 | }
155 | Catch {
156 | $ScriptSource = ''
157 | }
158 |
159 |
160 | If(!$Severity){$Severity = 1}
161 | $LogFormat = "" + "