diff options
| author | srdusr <trevorgray@srdusr.com> | 2024-06-12 23:40:03 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2024-06-12 23:40:03 +0200 |
| commit | 68b6f7c08f07612010c3435894e5554b0492e498 (patch) | |
| tree | 69ab296c49e35631651383a7dc38dc23c2ee3774 | |
| parent | 00ba98ea57c8fb24f0f192b18a4ab06a49a04056 (diff) | |
| download | dotfiles-68b6f7c08f07612010c3435894e5554b0492e498.tar.gz dotfiles-68b6f7c08f07612010c3435894e5554b0492e498.zip | |
Testing
| -rw-r--r-- | .config/powershell/bloatware.ps1 | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/.config/powershell/bloatware.ps1 b/.config/powershell/bloatware.ps1 index 697caa0..369079d 100644 --- a/.config/powershell/bloatware.ps1 +++ b/.config/powershell/bloatware.ps1 @@ -1,20 +1,12 @@ # bloatware.ps1 -# Load YAML module if not already loaded -if (-not (Get-Module -Name PowerShellYaml -ErrorAction SilentlyContinue)) { - Install-Module -Name PowerShellYaml -Force -Scope CurrentUser -} -Import-Module PowerShellYaml - -# Define the path to the packages.yml file -$packagesFile = "$HOME\packages.yml" - -# Read the YAML file -$packagesData = Get-YamlData -Path $packagesFile +# Define the path to the YAML file +$yamlFilePath = "$HOME\packages.yml" -# Define bloatware and default apps -$bloatware = $packagesData.bloatware -$defaultApps = $packagesData.default +# Parse the YAML file +$packages = ConvertFrom-Yaml -Path $yamlFilePath +$bloatware = $packages.bloatware +$defaultApps = $packages.defaultApps # Check if Registry key exists function Check-RegistryKeyExists { |
