Useful commands


Get the dynamic RPC ports used by the Windows Operating system

netsh interface [ipv4 | ipv6] show dynamicport [tcp | udp]

Disable NetBIOS over TCP/IP

wmic /interactive:off nicconfig where TcpipNetbiosOptions=0 call SetTcpipNetbios 2
wmic /interactive:off nicconfig where TcpipNetbiosOptions=1 call SetTcpipNetbios 2

Get the MTU setting for all interfaces

netsh interface ipv4 show subinterfaces

Get network adapter speed and duplex

Option Explicit

Dim WshShell
Dim result, vendor
Dim num, key, regentry
regentry = “HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\”
on error resume next
Set WshShell = CreateObject(“Wscript.Shell”)
For num = 0 to 20
key = right(“000” & num, 4)
result = wshShell.regread(regentry & key & “\Ndi\Interfaces\LowerRange”)
wscript.echo key & ” ” & result
if result = “ethernet” then
vendor = left(wshShell.regread(regentry & key & “\DriverDesc”), 5)
select case vendor
case “Intel”
wshshell.regwrite regentry & key & “\*SpeedDuplex”,4,”REG_SZ”
case “VMwar”
wscript.echo “Virtual NIC, changing nothing.”
case “Broad”
wshshell.regwrite regentry & key & “\*SpeedDuplex”,4,”REG_SZ”
end select
End If



(Get-Command <cmdlet>).Parameters



Run command prompt as NT AUTHORITY\SYSTEM

Download psexec.exe from here.

psexec -i -s -d cmd

Adding users to local administrators group

Net LocalGroup Administrators /add [Domain]\[Username]

The above command could also be used for any other local group.


Setting resource calendar permissions so all users can view subject and meeting organiser.

Set-MailboxFolderPermission -Identity [Resource Name or alias]:\Calendar -User default or individual user (security groups don't seem to work) -Access Rights LimitedDetails

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.