Updated version number and added the flags to main get-pc

This commit is contained in:
Zachary Gorman 2024-07-16 08:51:00 -07:00
parent 28ae983bf4
commit 61038d43e5
3 changed files with 20 additions and 2 deletions

View file

@ -12,7 +12,7 @@
RootModule = 'Get-PC.psm1' RootModule = 'Get-PC.psm1'
# Version number of this module. # Version number of this module.
ModuleVersion = '0.3.14' ModuleVersion = '0.3.15'
# Supported PSEditions # Supported PSEditions
# CompatiblePSEditions = @() # CompatiblePSEditions = @()

View file

@ -18,7 +18,7 @@ function Invoke-UninstallProgram ($Computer) {
foreach ($item in $selection) { foreach ($item in $selection) {
Write-Host "[$item] $($apps[$item].Name)" Write-Host "[$item] $($apps[$item].Name)"
} }
$res = Read-Host "Are you sure you want to delete this/these app(s)?" $res = Read-Host "Are you sure you want to delete this/these app(s)? (y/N)"
if (-not ($res -match "^[yY]")) { if (-not ($res -match "^[yY]")) {
Write-Host -ForegroundColor Red "Uninstall Aborted" Write-Host -ForegroundColor Red "Uninstall Aborted"
return return

View file

@ -102,6 +102,7 @@ Function Get-PC {
[Switch]$PCCleanup, [Switch]$PCCleanup,
[Switch]$PCReboot, [Switch]$PCReboot,
[Switch]$PCRename, [Switch]$PCRename,
[Switch]$Quiet,
[Switch]$RemoteDesktopApp, [Switch]$RemoteDesktopApp,
[Switch]$RequestLauncher, [Switch]$RequestLauncher,
[Switch]$Resources, [Switch]$Resources,
@ -112,6 +113,7 @@ Function Get-PC {
[switch]$SHSPrinterWeb, [switch]$SHSPrinterWeb,
[Switch]$SHSUser, [Switch]$SHSUser,
[Switch]$TableView, [Switch]$TableView,
[Switch]$UninstallProgram,
[switch]$Update, [switch]$Update,
[switch]$Usb, [switch]$Usb,
[Switch]$UserProfileBackup, [Switch]$UserProfileBackup,
@ -424,6 +426,11 @@ Function Get-PC {
continue continue
} }
if ($UninstallProgram) {
Invoke-UninstallProgram $comp
break
}
if ($GPUpdate) { if ($GPUpdate) {
if ($compStatus -ne 'Online') { if ($compStatus -ne 'Online') {
@ -446,6 +453,17 @@ Function Get-PC {
Get-Bypass $comp Get-Bypass $comp
} }
#Removes any indicator that another user is remoted onto their PC (like the green bar)
if ($Quiet) {
if ($compStatus -ne 'Online') {
Write-Warning "$comp is $compStatus unable to proccess command"
break
}
Invoke-Quiet $comp
}
#Runs Remote Viewer, Thick Client Only #Runs Remote Viewer, Thick Client Only
if ($ViewerRemote) { if ($ViewerRemote) {