wmic computersystem get "Name"
wmic process
wmic CPU get Name
Write-Host "Choose between these options:" | |
Write-Host | |
Write-Host "1. See a list of processes on the system" | |
Write-Host "2. See a list of services on the system" | |
Write-Host "3. Send a ping" | |
Write-Host "4. Double a number" | |
$userinput = Read-Host | |
if ( $userinput -eq "1") { |
netsh advfirewall set [privateprofile|publicprofile|domainprofile|currentprofile] state [on|off]
netsh advfirewall set [privateprofile|publicprofile|domainprofile|currentprofile] firewallpolicy [allowinbound|blockinbound|blockinboundalways|notconfigured],[allowoutbound|blockoutbound|notconfigured]
netsh advfirewall firewall add rule name="My Application" dir=in action=allow program="C:\MyApp\MyApp.exe" enable=yes remoteip=157.60.0.1,172.16.0.0/16,LocalSubnet profile=domain