scripts - adding demo server scripts
This commit is contained in:
@@ -9,6 +9,16 @@
|
||||
"category": "TRMM (Win):Browsers",
|
||||
"default_timeout": "300"
|
||||
},
|
||||
{
|
||||
"guid": "720edbb7-8faf-4a77-9283-29935e8880d0",
|
||||
"filename": "Win_Printer_ClearandRestart.bat",
|
||||
"submittedBy": "https://github.com/wh1te909",
|
||||
"name": "Printers - Clear all print jobs",
|
||||
"description": "This script will stop the spooler, delete all pending print jobs and restart the spooler",
|
||||
"shell": "cmd",
|
||||
"category": "TRMM (Win):Printing",
|
||||
"default_timeout": "300"
|
||||
},
|
||||
{
|
||||
"guid": "3ff6a386-11d1-4f9d-8cca-1b0563bb6443",
|
||||
"filename": "Win_Google_Chrome_Clear_Cache.ps1",
|
||||
@@ -143,6 +153,15 @@
|
||||
"shell": "powershell",
|
||||
"category": "TRMM (Win):Storage"
|
||||
},
|
||||
{
|
||||
"guid": "11be7136-0416-47b4-a6dd-9776fa857dca",
|
||||
"filename": "Win_Storage_CheckPools.ps1",
|
||||
"submittedBy": "https://github.com/wh1te909",
|
||||
"name": "Storage Pools - Check Health",
|
||||
"description": "Checks all storage pools for health, returns error 1 if unhealthy",
|
||||
"shell": "powershell",
|
||||
"category": "TRMM (Win):Monitoring"
|
||||
},
|
||||
{
|
||||
"guid": "cfa14c28-4dfc-4d4e-95ee-a380652e058d",
|
||||
"filename": "Win_Bios_Check.ps1",
|
||||
|
||||
9
scripts/Win_Printer_ClearandRestart.bat
Normal file
9
scripts/Win_Printer_ClearandRestart.bat
Normal file
@@ -0,0 +1,9 @@
|
||||
@echo off
|
||||
|
||||
sc stop spooler
|
||||
|
||||
timeout /t 5 /nobreak > NUL
|
||||
|
||||
del C:\Windows\System32\spool\printers\* /Q /F /S
|
||||
|
||||
sc start spooler
|
||||
16
scripts/Win_Storage_CheckPools.ps1
Normal file
16
scripts/Win_Storage_CheckPools.ps1
Normal file
@@ -0,0 +1,16 @@
|
||||
$pools = Get-VirtualDisk | select -ExpandProperty HealthStatus
|
||||
|
||||
$err = $False
|
||||
|
||||
ForEach ($pool in $pools) {
|
||||
if ($pool -ne "Healthy") {
|
||||
$err = $True
|
||||
}
|
||||
}
|
||||
|
||||
if ($err) {
|
||||
exit 1
|
||||
}
|
||||
else {
|
||||
exit 0
|
||||
}
|
||||
Reference in New Issue
Block a user