This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get the ID and security principal of the current user account | |
$myWindowsID = [System.Security.Principal.WindowsIdentity]::GetCurrent() | |
$myWindowsPrincipal = New-Object System.Security.Principal.WindowsPrincipal($myWindowsID) | |
# Get the security principal for the Administrator role | |
$adminRole = [System.Security.Principal.WindowsBuiltInRole]::Administrator | |
# Check to see if we are currently running "as Administrator" | |
if ($myWindowsPrincipal.IsInRole($adminRole)) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
cls | |
REM Define the options | |
setlocal enabledelayedexpansion | |
set i=0 | |
for %%a in ("Display IPv4 Protocol Configuration" "Display IPv6 Protocol Configuration" "Set IPv4 and IPv6 Packet TTL to 65" "Custom IPv4 and IPv6 Packet TTL" "Reset IPv4 and IPv6 Packet TTL" "Exit") do ( | |
set /a i+=1 | |
set "option[!i!]=%%~a" | |
) |