Windows Server 2008 Core Commands

Embed Size (px)

Citation preview

  • 7/30/2019 Windows Server 2008 Core Commands

    1/5

    TO RENAME THE COMPUTER

    NETDOM RENAMECOMPUTER %COMPUTERNAME% /NEWNAME:SERVERCORE1

    /USERD:ADMINISTRATOR /PASSWORDD:RIT-123 /REBOOT:10

    timedate.cpl-> To view Date n Time.

    systeminfo.exe-> To View brief Sys Info.

    msinfo32.exe-> To View complete Sys Info.

    intL.cpl-> To view regional and language settings.

    diskpart-> To view HDD vol Info

    To set IP address

    Syntax:

    netsh interface ipv4 set address name="Local Area Connection" source=static

    address= mask= gateway=

    EX:

    Netsh interface ipv4 set address name=2 source=static address=10.10.10.74

    mask=2555.255.255.0 gateway=10.10.10.1

    To set IP address dynamically

    Netsh interface ipv4 set address name="Local Area Connection"

    source=dhcp

    To get to know the lan interfaces

    Netsh interface ipv4 show interfaces

    To set DNS server address

    Netsh interface ipv4 add dnsservers name=2 address=10.10.10.70

    Netsh interface ipv4 set dnsservers name=2 address=10.10.10.70

    Netsh interface ipv4 set dnsservers name="Local Area Connection"

    source=dhcp

    Netsh interface ipv4 set dnsservers "Local Area Connection" static 10.0.0.1

    primary

    To enable r disable nic

  • 7/30/2019 Windows Server 2008 Core Commands

    2/5

    netsh interface set interface DISABLED

    For example to disable an interface with its default name Local Area Connection, run:

    netsh interface set interface Local Area Connection DISABLED

    To enable the interface, you'd then run:

    netsh interface set interface Local Area Connection ENABLED

    To switch off the advance firewall for all profiles

    Netsh advfirewall set allprofiles state off

    TO JOIN A DOMAIN(MEMBER)

    netdom join %computername% /domain:rooman.net

    /securepasswordprompt /reboot:30

    To join a domain (Member)

    Netdom join %computername% /domain:rooman.net

    /userd:[email protected] /passwordd:rit-123 /reboot:0

    To create a user

    Net user * /add /domainThen type the password

    dsadd user "CN=,CN=Users,DC=apple,DC=com" -pwd

    To create the users in an OU directly

    Redirusr ou=pheonix,dc=rooman,dc=net

    To check the Computer Name

    hostname

    To Create alias name of a computer

    netdom computername %computername% /add:itsupport.comSo here by doing this it will make itsupport.com as a alternate namefor thecomputer then,

    Netdom computername %computername% /makeprimary:itsupport.com

    To remove the alternate name

    Netdom computername %computername% /remove: (old computer name)

    To Join a machine to a Domainnetdom join %computername% /NewName: /UserD:

  • 7/30/2019 Windows Server 2008 Core Commands

    3/5

    UPN> /PasswordD:|* /Reboot:0

    To UNJoin a machine to a Domain

    netdom remove %computername% /Domain: /UserD: /PasswordD:|* /Reboot:0

    To make a machine as a domain controller

    Dcpromo /unattend /ReplicaOrNewDomain:domain /NewDomain=forest/NewDomainDNSname:it.net /ForestLevel=2 /DomainNetBiosName=it/DomainLevel=2 /InstallDNS=yes /ConfirmGc=yes/CreateDnsDelegation=no /DatabasePath:c:\windows\ntds/LogPath:c:\windows\ntds /SysVolPath:c:\windows\sysvol/SafeModeAdminPassword=

    To display Roles n Features

    oclist.exe

    To install a role or featureocsetup ;case sensitive

    To install a role or featureocsetup /uninstall

    To check Running Services

    sc query

    To start a servicesc start DHCP

    To stop the service sc stop DHCP

    To Enable RDcscript c:\windows\system32\scregedit.wsf /ARO

    To demote a domain controller to a normal workgroup machine

    dcpromo /AdministratorPassword:""/RemoveApplicationPartitions:yes /DemoteFsmo:yes/DnsDelegationPassword:""|*/DnsDelegationUserName:administrator/IgnoreIsLastDcInDomainMismatch:no /IgnoreIsLastDnsServerForZone:yes/IsLastDcInDomain:yes /Password:""|*/RebootOnCompletion:yes

    Additional Commands

  • 7/30/2019 Windows Server 2008 Core Commands

    4/5

    To enable remote mgmt of Server Core

    winrm quickconfig

    To enable backup

    wbadmin Enable backupwbadmin Start backupwbadmin stop job

    (Internet)notepad.exe - to open the notepadintl.cpl. to open the control panelControl desk.cpl - View or set display settings.Control intl.cpl - View or set regional and language options, including formatsand the keyboard layout.Control sysdm.cpl - View or set system properties.Control timedate.cpl - View or set the date, time, and time zone.Cscript slmgr.vbs ato - Activate the operating system.DiskRaid.exe - Configure software RAID.ipconfig /all - List information about the computers IP address configuration.NetDom RenameComputer - Set the servers name and domain membership.

    OCList.exe - List roles, role services, and features.OCSetup.exe - Add or remove roles, role services, and features.PNPUtil.exe - Install or update hardware device drivers.Sc query type=driver - List installed device drivers.Scregedit.wsf- Configure the operating system. Use the /cli parameter to listavailable configuration areas.ServerWerOptin.exe - Configure Windows Error Reporting.SystemInfo - List the system configuration details.WEVUtil.exe - View and search event logs.Wmic datafile where name=FullFilePath get version - List a filesversion.Wmic nicconfig index=9 call enabledhcp - Set the computer to use dynamicIP addressing rather than static IP addressing.

    Wmic nicconfig index=9 call enablestatic(IPAddress),(SubnetMask) - Set a computers static IP address and network mask.Wmic nicconfig index=9 call setgateways(GatewayIPAddress) - Set orchange the default gateway.Wmic product get name /value - List installed MSI applications by name.Wmic product where name=Name call uninstall - Uninstall an MSIapplication.Wmic qfe list - List installed updates and hotfixes.Wusa.exe PatchName.msu /quiet - Apply an update or hotfix to the operating

  • 7/30/2019 Windows Server 2008 Core Commands

    5/5

    system.