Tuesday, April 8, 2014

Server Core Commands and fundaments for New Users

To check the status of remote desktop on server core
c:\> cscript scregedit.wsf /AR /v

To enable remote desktop on server core
c:\> cscript scregedit.wsf /AR 0

To disable remote desktop on server core
c:\> cscript scregedit.wsf /AR 1

c:\> powershell
PS c:\>import-module servermanager

PS c:\>Install-windowsfeature server-gui-mgmt-infra, server-gui-shell -restart

Remove GUI shell

PS c:\>UnInstall-windowsfeature server-gui-mgmt-infra, server-gui-shell -restart


On demand features:

uninstall-windowsfeature -name gpmc -vhd "c:\programdata\microsoft\windows\hyper-full\virual
hard disks\debug\win-12 full.vhdx" -remove

install-windowsfeature dns -vhd "c:\programdata\microsoft\windows\hyper-full\virual
hard disks\debug\win-12 full.vhdx"

ON DEMAND FEATURES:

to see all features installed on the system

get-windowsfeature

uninstall a sepecific feature

uninstall -windowsfeature -name gpmc -rem