diff options
Diffstat (limited to '.config/powershell/bloatware.ps1')
| -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 { |
