Skip to content

Commit 1de2a06

Browse files
committed
Added batch scripts for automation
1 parent 0235021 commit 1de2a06

File tree

5 files changed

+61
-5
lines changed

5 files changed

+61
-5
lines changed

Automation/PasswordChangeNotification.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<#
2-
.Synopsis
2+
.SYNOPSIS
33
Script to Automated Email Reminders when Users Passwords due to Expire.
44
.DESCRIPTION
55
Script to Automated Email Reminders when Users Passwords due to Expire.

Batch Scripts/networkreset.bat

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@echo off
2+
:: BatchGotAdmin
3+
::-------------------------------------
4+
REM --> Check for permissions
5+
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
6+
7+
REM --> If error flag set, we do not have admin.
8+
if '%errorlevel%' NEQ '0' (
9+
echo Requesting administrative privileges...
10+
goto UACPrompt
11+
) else ( goto gotAdmin )
12+
13+
:UACPrompt
14+
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
15+
set params = %*:"="
16+
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
17+
18+
"%temp%\getadmin.vbs"
19+
del "%temp%\getadmin.vbs"
20+
exit /B
21+
22+
:gotAdmin
23+
pushd "%CD%"
24+
CD /D "%~dp0"
25+
::--------------------------------------
26+
ipconfig /release
27+
ipconfig /flushdns
28+
ipconfig /renew
29+
netsh int ip reset
30+
netsh winsock reset

Batch Scripts/reinstall.bat

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Rundll32 setupapi,InstallHinfSection Ndi-Steelhead 132 %windir%\inf\netrass.inf
2+
sc start mpssvc
3+
netsh advfirewall reset
4+
netsh advfirewall set domainprofile state on
5+
netsh advfirewall set privateprofile state on

Docker/docker-compose.yml

-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
version: "3.8"
22
services:
3-
43
redis:
54
image: redis:alpine
65
ports:
@@ -14,7 +13,6 @@ services:
1413
delay: 10s
1514
restart_policy:
1615
condition: on-failure
17-
1816
db:
1917
image: postgres:9.4
2018
volumes:
@@ -25,7 +23,6 @@ services:
2523
placement:
2624
constraints:
2725
- "node.role==manager"
28-
2926
vote:
3027
image: dockersamples/examplevotingapp_vote:before
3128
ports:
@@ -40,7 +37,6 @@ services:
4037
parallelism: 2
4138
restart_policy:
4239
condition: on-failure
43-
4440
result:
4541
image: dockersamples/examplevotingapp_result:before
4642
ports:
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[Cmdletbinding()]
2+
Param(
3+
[string]$Computername = "localhost"
4+
)
5+
cls
6+
$PysicalMemory = Get-WmiObject -class "win32_physicalmemory" -namespace "root\CIMV2" -ComputerName $Computername
7+
8+
Write-Host "Memore Modules:" -ForegroundColor Green
9+
$PysicalMemory | Format-Table Tag,BankLabel,@{n="Capacity(GB)";e={$_.Capacity/1GB}},Manufacturer,PartNumber,Speed -AutoSize
10+
11+
Write-Host "Total Memory:" -ForegroundColor Green
12+
Write-Host "$((($PysicalMemory).Capacity | Measure-Object -Sum).Sum/1GB)GB"
13+
14+
$TotalSlots = ((Get-WmiObject -Class "win32_PhysicalMemoryArray" -namespace "root\CIMV2" -ComputerName $Computername).MemoryDevices | Measure-Object -Sum).Sum
15+
Write-Host "`nTotal Memory Slots:" -ForegroundColor Green
16+
Write-Host $TotalSlots
17+
18+
$UsedSlots = (($PysicalMemory) | Measure-Object).Count
19+
Write-Host "`nUsed Memory Slots:" -ForegroundColor Green
20+
Write-Host $UsedSlots
21+
22+
If($UsedSlots -eq $TotalSlots)
23+
{
24+
Write-Host "All memory slots are filled up, none is empty!" -ForegroundColor Yellow
25+
}

0 commit comments

Comments
 (0)