Move PinnedItem script to proper location
This commit is contained in:
parent
81d0f2de32
commit
6e1322697a
2 changed files with 4 additions and 4 deletions
scripts/Windows/Software/PinnedItem
31
scripts/Windows/Software/PinnedItem/Manage.ps1
Normal file
31
scripts/Windows/Software/PinnedItem/Manage.ps1
Normal file
|
@ -0,0 +1,31 @@
|
|||
param (
|
||||
$Action,
|
||||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Software/PowerShell/Module.ps1";
|
||||
|
||||
$parameters = Get-ModuleInstallerComponents "PinnedItem" -NativeOnly;
|
||||
|
||||
foreach ($key in $PSBoundParameters.Keys) {
|
||||
$parameters.Add($key, $PSBoundParameters.TryGetValue($key));
|
||||
}
|
||||
|
||||
$arguments = $parameters.arguments;
|
||||
$arguments.Add("Installer", $parameters.installer);
|
||||
|
||||
Start-SoftwareInstaller @parameters -Installer {
|
||||
param(
|
||||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
$feature = "NetFx3";
|
||||
|
||||
if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") {
|
||||
Write-Host "Enabling ``$feature`` feature…";
|
||||
choco install --source windowsFeatures -y $feature;
|
||||
}
|
||||
|
||||
& $Arguments.Installer @PSBoundParameters;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue