aboutsummaryrefslogtreecommitdiff
path: root/.config/powershell/bloatware.ps1
diff options
context:
space:
mode:
Diffstat (limited to '.config/powershell/bloatware.ps1')
-rw-r--r--.config/powershell/bloatware.ps110
1 files changed, 10 insertions, 0 deletions
diff --git a/.config/powershell/bloatware.ps1 b/.config/powershell/bloatware.ps1
index 369079d..2c8dacb 100644
--- a/.config/powershell/bloatware.ps1
+++ b/.config/powershell/bloatware.ps1
@@ -1,5 +1,15 @@
# bloatware.ps1
+# Check if the powershell-yaml module is installed, if not, install it
+if (-not (Get-Module powershell-yaml -ListAvailable)) {
+ $policy = Get-PSRepository -Name 'PSGallery' | Select-Object -ExpandProperty InstallationPolicy
+ Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted
+ Install-Module powershell-yaml
+ Set-PSRepository -Name 'PSGallery' -InstallationPolicy $policy
+}
+
+Import-Module powershell-yaml
+
# Define the path to the YAML file
$yamlFilePath = "$HOME\packages.yml"