forked from dsccommunity/xPSDesiredStateConfiguration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xMsiPackage_UninstallPackageFromHttpsConfig.ps1
56 lines (47 loc) · 1.71 KB
/
xMsiPackage_UninstallPackageFromHttpsConfig.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<#PSScriptInfo
.VERSION 1.0.1
.GUID 6492da05-37f4-47c3-9c72-19da8983dfa0
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT
.TAGS DSCConfiguration
.LICENSEURI https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/master/LICENSE
.PROJECTURI https://github.com/PowerShell/xPSDesiredStateConfiguration
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES First version.
.PRIVATEDATA 2016-Datacenter,2016-Datacenter-Server-Core
#>
#Requires -module 'xPSDesiredStateConfiguration'
<#
.SYNOPSIS
Uninstalls the MSI file with the product ID using a file that is
accessed through an URL.
.DESCRIPTION
Uninstalls the MSI file with the product ID: '{DEADBEEF-80C6-41E6-A1B9-8BDB8A05027F}'
at the path: 'https://Examples/example.msi'.
.NOTES
The MSI file with the given product ID must already exist on
the server.
The product ID and path value in this file are provided for
example purposes only and will need to be replaced with valid values.
You can run the following command to get a list of all available MSI's
on your system with the correct Path (LocalPackage) and product ID
(IdentifyingNumber):
Get-WmiObject Win32_Product | Format-Table IdentifyingNumber, Name, LocalPackage
#>
Configuration xMsiPackage_UninstallPackageFromHttpsConfig
{
Import-DscResource -ModuleName 'xPSDesiredStateConfiguration'
Node localhost
{
xMsiPackage 'UninstallMsiPackageFromHttps'
{
ProductId = '{DEADBEEF-80C6-41E6-A1B9-8BDB8A05027F}'
Path = 'https://Examples/example.msi'
Ensure = 'Absent'
}
}
}