From 68b6f7c08f07612010c3435894e5554b0492e498 Mon Sep 17 00:00:00 2001 From: srdusr Date: Wed, 12 Jun 2024 23:40:03 +0200 Subject: Testing --- .config/powershell/bloatware.ps1 | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to '.config/powershell/bloatware.ps1') 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 { -- cgit v1.2.3