forked from dsccommunity/xPSDesiredStateConfiguration
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSample_xMsiPackage_InstallPackageFromFile.ps1
More file actions
28 lines (24 loc) · 1.01 KB
/
Sample_xMsiPackage_InstallPackageFromFile.ps1
File metadata and controls
28 lines (24 loc) · 1.01 KB
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
<#
.SYNOPSIS
Installs the MSI file with the product ID: '{DEADBEEF-80C6-41E6-A1B9-8BDB8A05027F}'
at the path: 'file://Examples/example.msi'.
Note that the MSI file with the given product ID must already exist at the specified path.
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 MSIs on
your system with the correct Path (LocalPackage) and product ID (IdentifyingNumber):
Get-WmiObject Win32_Product | Format-Table IdentifyingNumber, Name, LocalPackage
#>
Configuration Sample_xMsiPackage_InstallPackageFromFile
{
Import-DscResource -ModuleName 'xPSDesiredStateConfiguration'
Node localhost
{
xMsiPackage MsiPackage1
{
ProductId = '{DEADBEEF-80C6-41E6-A1B9-8BDB8A05027F}'
Path = 'file://Examples/example.msi'
Ensure = 'Present'
}
}
}