Monday, January 20, 2014

Windows Server 2012 R2 Core Notes

To enable PING on Server 2012 R2:
netsh firewall set icmpsetting 8
To enable File & Printer Sharing through filewall:
netsh advfirewall firewall set rule group=”File and Printer Sharing” new enable=yes
To get a list of features on Server 2012 R2:
dism.exe /online /Get-Features
To enable Remote Desktop Connections to the server over a network:
netsh advfirewall firewall set rule group="Remote Desktop" new enable=yes
To enable remote management of Server 2012 R2 via mmc over a network:
netsh advfirewall firewall set rule group="Windows Management Instrumentation (WMI)" new enable=yes
netsh advfirewall firewall set rule group="remote event log management" new enable=yes

netsh advfirewall firewall set rule group="Windows Remote Management" new enable=yes
 netsh advfirewall firewall set rule group="remote volume management" new enable=yes
sc config VDS start=auto
Create a Scheduled task to run daily at 10pm:
schtasks.exe /Create /SC DAILY /ST 22:00 /TN BACKUP /TR c:\pathto.cmd
Free GUI tool to manage Server 2012 R2 Core:
http://corefig.codeplex.com/
note: to transfer the extracted contents from the ZIP file to the server, enable the File and Printer Sharing firewall rule above, then connect to the server via SMB: \\servername\c$
Another free GUI tool that combines Corefig with Hyper-V management capabilities:
http://pshvm.codeplex.com/
A commercially available free tool to remotely manage Hyper-V on Server 2012 R2 Core:
http://5nine.com/5nine-manager-for-hyper-v-free.aspx
A free tool to diagnose issues with Remote Management:
http://blogs.technet.com/b/jhoward/archive/2008/11/14/configure-hyper-v-remote-management-in-seconds.aspx
note: when the server and client machines are on Workgroups, add the server administrator to the Credential Manager control panel applet on the client machine, and allow anonymous dcom on the client. This fixes errors such as E_ACCESSDENIED 0x80070005 when using 5Nine Manager for Hyper-V.
How to download files on the console without any additional tools:
powershell.exe "Import-Module BitsTransfer; Start-BitsTransfer -Source http://domain.tld/somefilename.exe -Destination c:\PathToAFolder" 

To download files from an FTP server using ftp.exe, enter these two Windows Firewall rules to allow ftp.exe to connect:
netsh advfirewall firewall add rule name="File Transfer Program" dir=in action=allow program=%SystemRoot%\System32\ftp.exe enable=yes protocol=tcp 
netsh advfirewall firewall add rule name="File Transfer Program" dir=in action=allow program=%SystemRoot%\System32\ftp.exe enable=yes protocol=udp