diff --git a/Microsoft.PowerShell_profile.ps1 b/Microsoft.PowerShell_profile.ps1 index 1c40432..50e5920 100644 --- a/Microsoft.PowerShell_profile.ps1 +++ b/Microsoft.PowerShell_profile.ps1 @@ -1,6 +1,20 @@ -Import-Module -Name PSWindowsUpdate -Import-Module -Name gsudoModule -Import-module -Name Terminal-Icons +if (Get-Module -ListAvailable -Name PSWindowsUpdate) { + Import-Module -Name PSWindowsUpdate +} else { + Write-Host "PSWindowsUpdate module not found" -ForegroundColor Red +} + +if (Get-Module -ListAvailable -Name gsudoModule) { + Import-Module -Name gsudoModule +} else { + Write-Host "gsudoModule module not found" -ForegroundColor Red +} + +if (Get-Module -ListAvailable -Name Terminal-Icons) { + Import-Module -Name Terminal-Icons +} else { + Write-Host "Terminal-Icons module not found" -ForegroundColor Red +} # aliases Set-Alias -Name reboot -Value Restart-Computer