aboutsummaryrefslogtreecommitdiff
path: root/.config/powershell/bloatware.ps1
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2024-06-13 00:54:51 +0200
committersrdusr <trevorgray@srdusr.com>2024-06-13 00:54:51 +0200
commit4ccbe0270c25ecab492508b5b0209ae53b9c35bd (patch)
treebdb141f22716abab6c668dc309f34838c216174b /.config/powershell/bloatware.ps1
parent68b6f7c08f07612010c3435894e5554b0492e498 (diff)
downloaddotfiles-4ccbe0270c25ecab492508b5b0209ae53b9c35bd.tar.gz
dotfiles-4ccbe0270c25ecab492508b5b0209ae53b9c35bd.zip
Testing
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"