Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Microsoft Exchange Server 2013 : Working with cmdlets (part 2) - Understanding cmdlet errors, Using cmdlet aliases

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
12/30/2014 3:33:12 AM

Understanding cmdlet errors

When you work with cmdlets, you’ll encounter two standard types of errors:

  • Terminating errors . Errors that halt execution

  • Nonterminating errors . Errors that cause error output to be returned but do not halt execution

With both types of errors, you’ll typically see error text that can help you resolve the problem that caused it. For example, an expected file might be missing or you might not have sufficient permissions to perform a specified task.

Using cmdlet aliases

For ease of use, Windows PowerShell lets you create aliases for cmdlets. An alias is an abbreviation for a cmdlet that acts as a shortcut for executing the cmdlet. For example, you can use the alias gsv instead of the cmdlet name Get-Service.

Table 3 provides a list of commonly used default aliases. Although there are many other aliases, these are the ones you’ll use most frequently.

Table 3. Commonly used cmdlet aliases

ALIAS

CMDLET

clear, cls

Clear-Host

Diff

Compare-Object

cp, copy

Copy-Item

Epal

Export-Alias

Epcsv

Export-Csv

Foreach

ForEach-Object

Fl

Format-List

Ft

Format-Table

Fw

Format-Wide

Gal

Get-Alias

ls, dir

Get-ChildItem

Gcm

Get-Command

cat, type

Get-Content

h, history

Get-History

gl, pwd

Get-Location

gps, ps

Get-Process

Gsv

Get-Service

Gv

Get-Variable

Group

Group-Object

Ipal

Import-Alias

Ipcsv

Import-Csv

R

Invoke-History

Ni

New-Item

Mount

New-PSDrive

Nv

New-Variable

rd, rm, rmdir, del, erase

Remove-Item

Rv

Remove-Variable

Sal

Set-Alias

sl, cd, chdir

Set-Location

sv, set

Set-Variable

Sort

Sort-Object

Sasv

Start-Service

Sleep

Start-Sleep

spps, kill

Stop-Process

Spsv

Stop-Service

write, echo

Write-Output

You can define additional aliases using the Set-Alias cmdlet. The syntax is:

set-alias aliasName cmdletName

where aliasName is the alias you want to use and cmdletName is the cmdlet for which you are creating an alias. The following example creates a “go” alias for the Get-Process cmdlet:

set-alias go get-process

To use your custom aliases whenever you work with Windows PowerShell, enter the related command line in your profile.

Other -----------------
- Microsoft Exchange Server 2013 : Using Windows PowerShell (part 2) - Running and using cmdlets, Running and using other commands and utilities
- Microsoft Exchange Server 2013 : Using Windows PowerShell (part 1) - Running and using Windows PowerShell
- Microsoft LynServer 2013 : Firewall and Security Requirements - Reverse Proxy Configuration (part 3) - Configuring Authentication and Certification on IIS Virtual Directories
- Microsoft LynServer 2013 : Firewall and Security Requirements - Reverse Proxy Configuration (part 2) - Configuring Web Publishing Rules
- Microsoft LynServer 2013 : Firewall and Security Requirements - Reverse Proxy Configuration (part 1)
- Microsoft LynServer 2013 : Firewall and Security Requirements - Reverse Proxy Requirements
- Microsoft LynServer 2013 : Firewall Requirements Overview, Ports Required for Internal and External Access
- Micorosoft Sharepoint 2013 : SharePoint Metadata Types (part 4) - Metadata in Publishing
- Micorosoft Sharepoint 2013 : SharePoint Metadata Types (part 3) - Metadata in Lists
- Micorosoft Sharepoint 2013 : SharePoint Metadata Types (part 2) - Content Types
 
 
25 Inspiring Game of Thrones Quotes
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
 
programming4us
Natural Miscarriage
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Game Trailer