Add scripts for backing up PuTTY
This commit is contained in:
parent
4e545ebcb9
commit
4dcf4a6d6a
1 changed files with 18 additions and 1 deletions
|
@ -5,10 +5,27 @@ param(
|
||||||
[hashtable] $Arguments
|
[hashtable] $Arguments
|
||||||
)
|
)
|
||||||
|
|
||||||
|
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
|
||||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||||
|
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
|
||||||
|
|
||||||
Start-SoftwareInstaller @PSBoundParameters `
|
Start-SoftwareInstaller @PSBoundParameters `
|
||||||
-Installer {
|
-Installer {
|
||||||
Install-ChocoPackage putty;
|
Install-ChocoPackage putty;
|
||||||
|
} `
|
||||||
|
-UserBackup {
|
||||||
|
param([hashtable] $Arguments)
|
||||||
|
$dir = New-TemporaryDirectory;
|
||||||
|
$fileName = Join-Path "$dir" PuTTY.reg;
|
||||||
|
& reg export "HKCU\Software\SimonTatham\PuTTY" $fileName /y;
|
||||||
|
Add-BackupArtifacts -User $Arguments.Name -Source $fileName -Path "PuTTY/PuTTY.reg";
|
||||||
|
Remove-Item -Recurse -Force $dir;
|
||||||
|
} `
|
||||||
|
-UserConfigurator {
|
||||||
|
param([hashtable] $Arguments)
|
||||||
|
$dir = New-TemporaryDirectory;
|
||||||
|
$fileName = Join-Path "$dir" PuTTY.reg;
|
||||||
|
Expand-BackupArtifacts -User $Arguments.Name -Path "PuTTY/PuTTY.reg" -Target $fileName;
|
||||||
|
& reg import $fileName;
|
||||||
|
Remove-Item -Recurse -Force $dir;
|
||||||
};
|
};
|
||||||
# ToDo: Add restoration
|
|
||||||
|
|
Loading…
Reference in a new issue