.
This commit is contained in:
2
EXnenv.bat
Normal file
2
EXnenv.bat
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
set DUFUS=
|
||||||
|
set TCHATID=
|
||||||
2
EXnenvH.bat
Normal file
2
EXnenvH.bat
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
set DUFUS=
|
||||||
|
set TCHATID=
|
||||||
2
EXtenv.bat
Normal file
2
EXtenv.bat
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
set DUFUS="1816161258:AAGNRS1t_ApXwAm0jJyms5H6H7BaJFPvyok"
|
||||||
|
set TCHATID="1462463122"
|
||||||
5
NetworkScripts/DisableNet.ps1
Normal file
5
NetworkScripts/DisableNet.ps1
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#Get-NetFirewallRule -DisplayGroup 'Network Discovery'
|
||||||
|
Set-NetFirewallRule -DisplayGroup 'Network Discovery' -Profile 'Private' -Enabled false
|
||||||
|
Set-NetFirewallRule -DisplayGroup 'File And Printer Sharing' -Profile 'Private' -Enabled false
|
||||||
|
|
||||||
|
#select Name,DisplayName,Enabled,Profile|ft -a
|
||||||
9
NetworkScripts/EnableNet.ps1
Normal file
9
NetworkScripts/EnableNet.ps1
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#Get-NetFirewallRule -DisplayGroup 'Network Discovery'
|
||||||
|
Set-NetFirewallRule -DisplayGroup 'Network Discovery' -Profile 'Private' -Enabled true
|
||||||
|
Set-NetFirewallRule -DisplayGroup 'File And Printer Sharing' -Profile 'Private' -Enabled true
|
||||||
|
|
||||||
|
Get-NetConnectionProfile -InterfaceAlias "Ethernet" | Set-NetConnectionProfile -NetworkCategory Private
|
||||||
|
Get-NetConnectionProfile -InterfaceAlias "WiFi" | Set-NetConnectionProfile -NetworkCategory Private
|
||||||
|
#Get-NetConnectionProfile -InterfaceAlias "Ethernet1" | Set-NetConnectionProfile -NetworkCategory Private
|
||||||
|
|
||||||
|
#select Name,DisplayName,Enabled,Profile|ft -a
|
||||||
10
baseENV.bat
Normal file
10
baseENV.bat
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
@echo off
|
||||||
|
set check_computername=%COMPUTERNAME%
|
||||||
|
echo "Found computer %check_computername%"
|
||||||
|
|
||||||
|
set PACKAGES="C:\Packages"
|
||||||
|
set WPUBLIC="C:\wPublic"
|
||||||
|
|
||||||
|
set BASE=C:\Scripts\wBase
|
||||||
|
set LOCAL=C:\Scripts\wLocal
|
||||||
|
set TMESSAGE=%BASE%\tmessage.bat
|
||||||
20
baseFixTime.bat
Normal file
20
baseFixTime.bat
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
set C:\Scripts\wBase\baseENV.bat
|
||||||
|
@REM xxxxxxx
|
||||||
|
|
||||||
|
echo "base_Logon: FIXTIME"
|
||||||
|
|
||||||
|
w32tm /unregister
|
||||||
|
|
||||||
|
w32tm /register
|
||||||
|
|
||||||
|
sc start w32time
|
||||||
|
|
||||||
|
sc config w32time start=auto
|
||||||
|
|
||||||
|
w32tm /config /update /manualpeerlist:"time.windows.com"
|
||||||
|
|
||||||
|
w32tm /resync
|
||||||
|
|
||||||
|
@REM sc queryex state=all type=service
|
||||||
13
baseShutdown.bat
Normal file
13
baseShutdown.bat
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
set C:\Scripts\wBase\baseENV.bat
|
||||||
|
@REM xxxxxxx
|
||||||
|
|
||||||
|
|
||||||
|
if "%check_computername%" EQU "SERVER" (
|
||||||
|
echo " NOT shutting down server "
|
||||||
|
) else (
|
||||||
|
echo "echo "shutting down""
|
||||||
|
call %TMESSAGE% '"%check_computername% shutting down"'
|
||||||
|
C:\Windows\System32\shutdown.exe /s /t 1
|
||||||
|
)
|
||||||
21
base_Logon.bat
Normal file
21
base_Logon.bat
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
set C:\Scripts\wBase\baseENV.bat
|
||||||
|
@REM xxxxxxx
|
||||||
|
|
||||||
|
set LOCAL_LOGON=%LOCAL%\local_Logon.bat
|
||||||
|
|
||||||
|
echo "base_Logon: Started"
|
||||||
|
|
||||||
|
FOR %%x IN (%BASE%\b_*.bat) DO (
|
||||||
|
echo "%%x"
|
||||||
|
call "%%x"
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "%LOCAL_LOGON%" (
|
||||||
|
echo "Starting LOCALISED logon %LOCAL_LOGON%"
|
||||||
|
call %LOCAL_LOGON%
|
||||||
|
)
|
||||||
|
|
||||||
|
echo "base_Logon: Finished"
|
||||||
|
|
||||||
20
base_Onboot.bat
Normal file
20
base_Onboot.bat
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
set C:\Scripts\wBase\baseENV.bat
|
||||||
|
@REM xxxxxxx
|
||||||
|
|
||||||
|
set LOCAL_ONBOOT=%LOCAL%\local_Onboot.bat
|
||||||
|
|
||||||
|
echo "base_Onboot: Started"
|
||||||
|
|
||||||
|
set SPEEDUP=C:\Scripts\NetworkScripts\SpeedUp.bat
|
||||||
|
|
||||||
|
call %TMESSAGE% '"%check_computername% Onboot starting "'
|
||||||
|
|
||||||
|
|
||||||
|
echo "Fixing time...."
|
||||||
|
call %BASE%baseFixTime.bat
|
||||||
|
|
||||||
|
call %TMESSAGE% '"...STARTED base %check_computername% "'
|
||||||
|
|
||||||
|
echo "base_Onboot: Finished"
|
||||||
9
nmsg.bat
Normal file
9
nmsg.bat
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
@echo off
|
||||||
|
SECRETS="%BASE%\secrets\nenv.bat
|
||||||
|
call %SECRETS%
|
||||||
|
|
||||||
|
set MSG=bungler dungler
|
||||||
|
set STRING='%~1%'
|
||||||
|
|
||||||
|
curl -d %STRING% ntfy.sh/%DUFUS%
|
||||||
|
|
||||||
9
nmsgH.bat
Normal file
9
nmsgH.bat
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
@echo off
|
||||||
|
SECRETS="%BASE%\secrets\nenvH.bat
|
||||||
|
call %SECRETS%
|
||||||
|
|
||||||
|
set MSG=bungler dungler
|
||||||
|
set STRING='%~1%'
|
||||||
|
|
||||||
|
curl -d %STRING% ntfy.sh/%DUFUS%
|
||||||
|
|
||||||
10
tmessage.bat
Normal file
10
tmessage.bat
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
set C:\Scripts\wBase\baseENV.bat
|
||||||
|
@REM xxxxxxx
|
||||||
|
|
||||||
|
|
||||||
|
set STRING='%~1%'
|
||||||
|
|
||||||
|
call %BASE%\nmsg.bat %STRING%
|
||||||
|
|
||||||
10
tmessageH.bat
Normal file
10
tmessageH.bat
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
set C:\Scripts\wBase\baseENV.bat
|
||||||
|
@REM xxxxxxx
|
||||||
|
|
||||||
|
|
||||||
|
set STRING='%~1%'
|
||||||
|
|
||||||
|
call %BASE%\nmsgH.bat %STRING%
|
||||||
|
|
||||||
14
tmsg.bat
Normal file
14
tmsg.bat
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
@echo off
|
||||||
|
set myname=%COMPUTERNAME%
|
||||||
|
echo "Found computer %myname%"
|
||||||
|
|
||||||
|
@REM set DUFUS="1816161258:AAGNRS1t_ApXwAm0jJyms5H6H7BaJFPvyok"
|
||||||
|
@REM set TCHATID="1462463122"
|
||||||
|
|
||||||
|
call C:\Scripts\Base\tenv.bat
|
||||||
|
|
||||||
|
set MSG=bungler dungler
|
||||||
|
set STRING='%~1%'
|
||||||
|
|
||||||
|
curl -X POST -H 'content-type: application/json' -F "chat_id=%TCHATID%" -F "text=%STRING%" https://api.telegram.org/bot%DUFUS%/sendmessage
|
||||||
|
|
||||||
Reference in New Issue
Block a user