Friday, March 29, 2013

Command Line 2013

Remote desktop enable (no need to reboot)
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

Remote desktop disable (no need to reboot)
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f

To enable Remote assistance:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fAllowToGetHelp /t REG_DWORD /d 1 /f

Allow RDP in Windows Firewall
netsh firewall set service type = remotedesktop mode = enable

------------------------------------------------------------------------------------------------
Get-MailboxDatabase -Status | ft Name,DatabaseSize,AvailableNewMailboxSpace

Tuesday, March 19, 2013

Cisco 3750x DHCP static IP assignment

Assuming you’ve got a DHCP scope that’s set up something like this:

ip dhcp pool vlan7
   network 10.1.7.0 255.255.255.0
   domain-name mmx.com
   dns-server 172.16.1.75
   default-router 10.1.7.1
   lease 3

ip dhcp pool static-Vlan7
host 10.1.7.51 255.255.255.0
client-identifier 01D3.BE.D9.BC.74.58

ip dhcp pool vlan9
   network 10.1.9.0 255.255.255.0
   domain-name mmx.com
   dns-server 172.16.1.75
   default-router 10.1.9.1
   lease 3

ip dhcp pool static-Vlan9
host 10.1.9.51 255.255.255.0
client-identifier 01DD.BB.DE.BC.74.58


Note that the “client-identifier” line is obviously the MAC address with “01? tacked on the front. This is important. Won’t work otherwise. Add as many static entries as you like.

If you want to stop the router from giving out an IP address:

ip dhcp excluded-address 10.1.7.1

or

ip dhcp excluded-address 10.1.7.1 10.1.7.50

You can also stop it from giving any dynamic addresses by doing this:

ip dhcp excluded-address 10.1.7.1 10.1.7.254

Then it will only give out static assignments…