programming4us
programming4us
DESKTOP

Managing Windows Server 2012 (part 3) - Working with the administration tools - Using command-line utilities

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

1.3 Using command-line utilities

Many command-line utilities are included with Windows Server 2012. Most of the utilities you’ll work with as an administrator rely on TCP/IP. Because of this, you should install TCP/IP networking before you experiment with these tools.

Utilities to know

As an administrator, you should familiarize yourself with the following command-line utilities:

  • Appcmd Displays and manages the configuration of IIS.

  • Arp Displays and manages the IP-to-physical address mappings used by Windows Server 2012 to send data on the TCP/IP network.

  • Bcdedit Displays and manages Boot Configuration Data on the local system.

  • DiskPart Displays and manages disk partitions on local and remote systems.

    Note

    Windows 8 and Windows Server 2012 might be the last versions of Windows to support Disk Management, DiskPart, and DiskRaid. The Virtual Disk Service (VDS) COM interface is being superseded by the Storage Management API. You can continue to use Disk Management and DiskPart to manage storage. These tools cannot be used to manage Storage Spaces, nor can the cmdlets in the Storage module for PowerShell be used to manage dynamic disks. Dynamic disks also are being phased out in favor of Storage Spaces and might not be available in future versions of Windows.

  • Dnscmd Displays and manages the configuration of DNS services.

  • Ftp Starts the built-in FTP client.

  • Hostname Displays the computer name of the local system.

  • Ipconfig Displays the TCP/IP properties for network adapters installed on the system. You can also use it to renew and release DHCP information.

  • Nbtstat Displays statistics and current connections for NetBIOS over TCP/IP.

  • Net Displays a family of useful networking commands.

  • Netsh Displays and manages the network configuration of local and remote computers.

  • Netstat Displays current TCP/IP connections and protocol statistics.

  • Nslookup Checks the status of a host or IP address when used with DNS.

  • Pathping Traces network paths, and displays packet loss information.

  • Ping Tests the connection to a remote host.

  • Route Manages the routing tables on the system.

  • Schtasks Displays and manages scheduled tasks on local and remote systems.

  • Tracert During testing, determines the network path taken to a remote system.

  • Wbadmin Performs backup and recovery operations, including system state recovery and recovery of any type of disk to an alternate location. Also gets disk details, including name, GUID, available space, and related volumes.

  • Wevtutil Displays and manages event logs on local and remote systems.

To learn how to use these command-line tools, type the name at a command prompt followed by /?. Windows Server 2012 then provides an overview of how the command is used (in most cases).

Using Net tools

You can more easily manage most of the tasks performed with the Net commands by using graphical administrative tools and Control Panel utilities. However, some of the Net tools are very useful for performing tasks quickly or for obtaining information, especially during telnet sessions to remote systems. These commands include the following:

  • Net Start Starts a service on the system.

  • Net Stop Stops a service on the system.

  • Net Time Displays the current system time, or synchronizes the system time with another computer.

  • Net Use Connects and disconnects from a shared resource.

  • Net View Displays a list of network resources available to the system.

To learn how to use any of the Net command-line tools, type net help at a command prompt followed by the command name, such as net help start. Windows Server 2012 then provides an overview of how the command is used.

Using Windows PowerShell

Windows PowerShell is installed by default with Windows Server 2012. PowerShell is a full-featured command shell that can use built-in commands called cmdlets and built-in programming features, as well as standard command-line utilities. Normally, PowerShell is installed by default on Windows Server 2012 and on Windows 8 Pro and Windows 8 Enterprise. If so, you can run Windows PowerShell, using the following techniques:

  • From Start, a quick way to open Windows PowerShell is to type powershell and press Enter.

  • From Desktop, PowerShell is normally pinned to the taskbar, enabling you to run PowerShell simply by tapping or clicking the related taskbar button.

Note

If Windows PowerShell is not installed, you can install it as a feature of the operating system. In Windows Server 2012, use the Add Features And Roles Wizard. In Windows 8, use Control Panel to turn on Windows PowerShell as a feature.

After starting Windows PowerShell, you can enter the name of a cmdlet at the prompt and it will run in much the same way as a command-line command. You can also execute cmdlets from within scripts. Cmdlets are named using verb-noun pairs. The verb tells you what the cmdlet does in general. The noun tells you what specifically the cmdlet works with. For example, the get-variable cmdlet either gets all Windows PowerShell environment variables and returns their values or gets a specifically named environment variable and returns its values. These are the common verbs associated with cmdlets:

  • Get- Queries a specific object or a subset of a type of object, such as a specified mailbox or all mailbox users.

  • Set- Modifies specific settings of an object.

  • Enable- Enables a setting or mail-enables a recipient.

  • Disable- Disables an enabled setting or mail-disables a recipient.

  • New- Creates a new instance of an item, such as a new mailbox.

  • Remove- Removes an instance of an item, such as a mailbox.

At the Windows PowerShell prompt, you can get a complete list of cmdlets available by typing help *-*. To get help documentation on a specific cmdlet, type help followed by the cmdlet name, such as help get-variable.

All cmdlets have configurable aliases as well, which act as shortcuts for executing cmdlets. To list all aliases available, type get-item –path alias: at the PowerShell prompt. You can create an alias that invokes any command using the following syntax:

new-item -path alias:AliasName -value:FullCommandPath

Here, AliasName is the name of the alias to create, and FullCommandPath is the full path to the command to run, such as:

new-item -path alias:sm -value:c:\windows\system32\compmgmtlauncher.exe

This example creates the alias sm for starting Server Manager. To use this alias, you simply type sm and then press Enter when you are working with PowerShell.

Running Windows commands at the PowerShell prompt

Increasingly administrators are using Windows PowerShell as their go-to prompt for entering both standard Windows commands and Windows PowerShell commands. Although it is true that anything you can type at a command prompt can be typed at the Windows PowerShell prompt, you need to understand the caveats that apply. Windows PowerShell looks for external commands and utilities as part of its normal processing. As long as the external command or utility is found in a directory specified by the PATH environment variable, the command or utility is run as appropriate. However, keep in mind Windows PowerShell execution order could affect whether a command runs as expected. For Windows PowerShell, the execution order is as follows:

  1. Alternate built-in or profile-defined aliases

  2. Built-in or profile-defined functions

  3. Cmdlets or language keywords

  4. Scripts with the .ps1 extension

  5. External commands, utilities, and files

Thus, when you run a Windows command from the PowerShell prompt, you have to ensure that no element in 1 to 4 of the execution order has the same name as the Windows command you want to run. If an element has the same name, that element will run instead of the expected command.

Resolving passthrough problems

When you are working with the PowerShell prompt, arguments you pass in with commands won’t be handled as expected. The reason for this is that PowerShell doesn’t pass the arguments through in the same way as the command prompt expects them. To resolve this and make it possible to pass in arguments with Windows commands run at the PowerShell prompt, you must enclose the arguments in single quotation marks.
Other  
 
Top 10
Free Mobile And Desktop Apps For Accessing Restricted Websites
MASERATI QUATTROPORTE; DIESEL : Lure of Italian limos
TOYOTA CAMRY 2; 2.5 : Camry now more comely
KIA SORENTO 2.2CRDi : Fuel-sipping slugger
How To Setup, Password Protect & Encrypt Wireless Internet Connection
Emulate And Run iPad Apps On Windows, Mac OS X & Linux With iPadian
Backup & Restore Game Progress From Any Game With SaveGameProgress
Generate A Facebook Timeline Cover Using A Free App
New App for Women ‘Remix’ Offers Fashion Advice & Style Tips
SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
- Messages forwarded by Outlook rule go nowhere
- Create and Deploy Windows 7 Image
- How do I check to see if my exchange 2003 is an open relay? (not using a open relay tester tool online, but on the console)
- Creating and using an unencrypted cookie in ASP.NET
- Directories
- Poor Performance on Sharepoint 2010 Server
- SBS 2008 ~ The e-mail alias already exists...
- Public to Private IP - DNS Changes
- Send Email from Winform application
- How to create a .mdb file from ms sql server database.......
programming4us programming4us
programming4us
 
 
programming4us