Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Wednesday, July 8, 2020

Block malicious IP on Windows-MacOS commandline

Windows:
netsh advfirewall firewall add rule name="IP Block" dir=in
interface=any action=block remoteip=x.x.x.x

MacOS:
sudo echo “block drop from any to x.x.x.x” >> /ect/pf.conf” &&
sudo pfctl -e -f /etc/pf.conf

Thursday, November 9, 2017

windows file sharing operations

list all active connections:

net use

remove all active connections:

net use * /delete

remove specific connection

net use \\<ip>\<share> /delete

add connection

net use \\<ip>\<share> /user:domain/username <password> /persistent:yes

make symbolic link for file share

mklink /d c:\temp\<localpath> \\<ip>\<share>

Tuesday, September 5, 2017

Komut satırından ram model ve hız bilgileri öğrenme

Windows komut satırından memory'ye ilişkin detay bilgiler öğrenme:

wmic MemoryChip get BankLabel, Capacity, MemoryType, TypeDetail, Speed
BankLabel  Capacity    MemoryType  Speed  TypeDetail
BANK 0     4294967296  24          1600   128
BANK 2     4294967296  24          1600   128

https://msdn.microsoft.com/en-us/library/windows/desktop/aa394347(v=vs.85).aspx