.
This commit is contained in:
@ -1,7 +0,0 @@
|
||||
@echo off
|
||||
set EXE="%SYSTEMROOT%\system32\WindowsPowerShell\v1.0\powershell.exe"
|
||||
set TEMPLATE="C:\Packages\SSH\SpeedUp.ps1"
|
||||
set TEMPLATE="C:\Scripts\wpublic\bin\SpeedUp.ps1"
|
||||
|
||||
%EXE% -ExecutionPolicy Bypass -File %TEMPLATE%
|
||||
|
||||
110
b_power.bat
110
b_power.bat
@ -1,63 +1,30 @@
|
||||
@echo on
|
||||
@echo off
|
||||
call C:\Scripts\wBase\baseENV.bat
|
||||
call C:\Scripts\wLocal\localENV.bat
|
||||
@REM xxxxxxx
|
||||
echo "START: %~n0"
|
||||
|
||||
@REM set powershell variables
|
||||
|
||||
@REM set variables to ensure they are set,
|
||||
@REM set variables to ensure they are set
|
||||
@REM POWERCFG 0 - no change
|
||||
@REM POWERCFG 1 - change profiles
|
||||
|
||||
set ZUPER=0
|
||||
set POWERCFG=0
|
||||
|
||||
@REM if "%USERNAME%" == "zuper" (
|
||||
@REM echo "Found user %USERNAME%"
|
||||
@REM echo "Not setting up POWERCFG for %USERNAME%"
|
||||
@REM set ZUPER=1
|
||||
@REM )
|
||||
|
||||
if "%check_computername%" EQU "SERVER" (
|
||||
echo %COMPUTERNAME% | find /I "server" >nul
|
||||
if %errorlevel%==0 (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "SERVER2" (
|
||||
echo %COMPUTERNAME% | find /I "surgery" >nul
|
||||
if %errorlevel%==0 (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "SURGERY1" (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "SURGERY2" (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "SURGERY3" (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "SURGERY4" (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "SURGERY5" (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "SURGERY6" (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "SURGERY7" (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "SURGERY8" (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "RECEPTION1" (
|
||||
echo %COMPUTERNAME% | find /I "reception" >nul
|
||||
if %errorlevel%==0 (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
@ -65,46 +32,27 @@ if "%check_computername%" EQU "RECEPTION2" (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "RECEPTION3" (
|
||||
set POWERCFG=1
|
||||
|
||||
if [%POWERCFG%] == [0] (
|
||||
echo "Reset power profiles"
|
||||
powercfg -restoredefaultschemes
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "RECEPTION4" (
|
||||
set POWERCFG=1
|
||||
if [%POWERCFG%] == [1] (
|
||||
echo "Disabling power profiles"
|
||||
powercfg /q SCHEME_CURRENT > C:\Scripts\pbefore.txt
|
||||
powercfg /change monitor-timeout-ac 0
|
||||
powercfg /change monitor-timeout-dc 0
|
||||
powercfg /change disk-timeout-ac 0
|
||||
powercfg /change disk-timeout-dc 0
|
||||
powercfg /change standby-timeout-ac 0
|
||||
powercfg /change standby-timeout-dc 0
|
||||
powercfg -setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATLEVELCRIT 75
|
||||
powercfg -setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATACTIONCRIT 3
|
||||
powercfg -setacvalueindex SCHEME_CURRENT SUB_BATTERY BATACTIONCRIT 3
|
||||
powercfg -setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATACTIONLOW 3
|
||||
powercfg -setacvalueindex SCHEME_CURRENT SUB_BATTERY BATACTIONLOW 3
|
||||
powercfg /q SCHEME_CURRENT > C:\Scripts\pafter.txt
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "RECEPTION5" (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
if "%check_computername%" EQU "RECEPTION6" (
|
||||
set POWERCFG=1
|
||||
)
|
||||
|
||||
@REM if [%ZUPER%] == [1] (
|
||||
@REM echo "Not installing printers"
|
||||
@REM ) else (
|
||||
if [%POWERCFG%] == [0] (
|
||||
echo "Reset power profiles"
|
||||
powercfg -restoredefaultschemes
|
||||
)
|
||||
|
||||
if [%POWERCFG%] == [1] (
|
||||
echo "Disabling power profiles"
|
||||
powercfg /q SCHEME_CURRENT > C:\Scripts\pbefore.txt
|
||||
powercfg /change monitor-timeout-ac 0
|
||||
powercfg /change monitor-timeout-dc 0
|
||||
powercfg /change disk-timeout-ac 0
|
||||
powercfg /change disk-timeout-dc 0
|
||||
powercfg /change standby-timeout-ac 0
|
||||
powercfg /change standby-timeout-dc 0
|
||||
powercfg -setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATLEVELCRIT 75
|
||||
powercfg -setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATACTIONCRIT 3
|
||||
powercfg -setacvalueindex SCHEME_CURRENT SUB_BATTERY BATACTIONCRIT 3
|
||||
powercfg -setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATACTIONLOW 3
|
||||
powercfg -setacvalueindex SCHEME_CURRENT SUB_BATTERY BATACTIONLOW 3
|
||||
powercfg /q SCHEME_CURRENT > C:\Scripts\pafter.txt
|
||||
)
|
||||
@REM )
|
||||
|
||||
echo "FINISHED: %~n0"
|
||||
@ -1,7 +1,11 @@
|
||||
@echo off
|
||||
call C:\Scripts\wBase\baseENV.bat
|
||||
call C:\Scripts\wLocal\localENV.bat
|
||||
@REM xxxxxxx
|
||||
echo "START: %~n0"
|
||||
|
||||
echo "Dump software list"
|
||||
set PSFILE="%WBASE%\bin\SoftwareList.ps1"
|
||||
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE% > "C:\%check_computername%.txt"
|
||||
|
||||
echo "FINISHED: %~n0"
|
||||
@ -1,14 +1,11 @@
|
||||
@echo off
|
||||
set check_computername=%COMPUTERNAME%
|
||||
echo "Found computer %check_computername%"
|
||||
|
||||
set PACKAGES="C:\Packages"
|
||||
|
||||
set WBASE="C:\Scripts\wBase"
|
||||
set WLOCAL="C:\Scripts\wLocal"
|
||||
|
||||
set POWERSHELL=%SYSTEMROOT%\system32\WindowsPowerShell\v1.0\powershell.exe
|
||||
call C:\Scripts\wBase\baseENV.bat
|
||||
call C:\Scripts\wLocal\localENV.bat
|
||||
@REM xxxxxxx
|
||||
echo "START: %~n0"
|
||||
|
||||
echo "Speed up Powershell processing"
|
||||
set PSFILE="%WBASE%\bin\SpeedUp.ps1"
|
||||
%POWERSHELL% -ExecutionPolicy Bypass -File %PSFILE%
|
||||
|
||||
echo "FINISHED: %~n0"
|
||||
Reference in New Issue
Block a user