Windows 2008 Server Core – Commands

Here are a some common commands for configuration issues regarding Windows 2008 Core :

  • Enable Terminal Server:
    cscript C:\Windows\System32\Scregedit.wsf /ar 0To view this setting:
    cscript C:\Windows\System32\Scregedit.wsf /ar /v
  • Enable remote management from any MMC snap-in:
    netsh advfirewall firewall set rule group=”Remote Desktop” new enable=yes
    netsh advfirewall firewall set rule group=”Remote Administration” new enable=yes
  • Enable Remote Management (Firewall):
    netsh advfirewall set currentprofile settings remotemanagement enable
  • Rename computername:
    NETDOM renamecomputer %computername% /newname:vshost
  • Restart the computer:
    Shutdown /r /f /t 0
  • Logoff from the console:
    Logoff.exe
  • Set the date and timezone:
    control timedate.cpl
  • Query all the networkadapters :
    netsh interface ipv4 show interfaces
  • Configure the networkadapter:Set a Static IP:
    netsh interface ipv4 set address name=”2″ source=static address=172.168.2.2 mask=255.255.255.0 gateway=172.168.2.1Set a DNS server:netsh interface ipv4 add dnsserver name=”2″ address=172.168.2.1 index=1
    netsh interface ipv4 add dnsserver name=”2″ address=172.168.2.10 index=1
  • Add a Windows 2008 Core Server to the domain:
    netdom join W2K8DC04 /domain:domain.local /userd:DOMAIN\ACCOUNT /passwordd:YOURPASSWORD
  • Active Windows 2008 Core Server:
    C:\Windows\System32\slmgr.vbs -ato
  • Set password for Administrator:
    net user administrator *
  • Enable Windows Remote Shell:
    WinRM quickconfigUse Windows Remote Shell:
    On Vista Sp1 :
    start cmd (with a user who has administrator access to the remote machine)
    winrs -r:SERVERNAME cmdor start in a new window :
    start winrs -r:SERVERNAME cmd
  • Add hardware to Core
    pnputil -i -a <driverinf>
  • Display device driver list:
    sc query type= driver
  • Forcibly stop a service:
    Use the tasklist command to retrieve the process ID (PID).
    taskkill /PID <process ID>
  • Configure Paging File:
    wmic pagefileset where name=”<path/filename>” set InitialSize=<initialsize>,MaximumSize=<maxsize>path/filename – is the path to and name of the paging file
    initialsize – is the starting size of the paging file in bytes
    maxsize – is the maximum size of the page file in bytes
  • Discover the available server roles:
    oclist.exe
  • Install Server Role:
    Example : start /w ocsetup DHCPServerCoreDNSDNS = DNS-Server-Core-Role
    File Replication = FRS-Infrastructure
    Distributed File System= DFSN-Server
    Services for Network File System = ServerForNFS-Base, ClientForNFS-Base
    Print Server = Printing-ServerCore-Role, Printing-LPDPrintService
    Streaming Media Services = MediaServer (KB 934518)
    SNMP = SNMP-SC
  • Configure Service :
    Example : sc config dhcpserver start= auto
  • Remove programs:
    Check registry key : HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
    (regedit.exe , regedt32.exe)
  • Check for new Windows Updates:
    wmic.exe qfe
  • Remove a Windows Update:
    wusa.exe patchname.msu

 

Do you know any other commands for the list?

Post to Twitter Post to Delicious Post to Digg Post to Facebook