-
Notifications
You must be signed in to change notification settings - Fork 134
/
Sample_xWindowsPackageCab.ps1
48 lines (39 loc) · 1.12 KB
/
Sample_xWindowsPackageCab.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
<#
.SYNOPSIS
Install a package from cab file with the specified name from the specified source path and outputs a log to the specified log path.
.PARAMETER Name
The name of the package to install.
.PARAMETER SourcePath
The path to the cab file to install the package from.
.PARAMETER LogPath
The path to a file to log the install operation to.
.NOTES
The DISM PowerShell module must be available on the target machine.
#>
Configuration Sample_xWindowsPackageCab
{
param
(
[Parameter (Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$Name,
[Parameter (Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$SourcePath,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
$LogPath
)
Import-DscResource -ModuleName 'xPSDesiredStateConfiguration'
xWindowsPackageCab WindowsPackageCab1
{
Name = $Name
Ensure = 'Present'
SourcePath = $SourcePath
LogPath = $LogPath
}
}
Sample_xWindowsPackageCab