IT tutorials
 
Technology
 

Windows Server 2008 : Starting and Using PowerShell - Creating Aliases, Discovering Windows PowerShell Commands

12/26/2013 1:02:43 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

Creating Aliases

Windows PowerShell includes many built-in aliases, but you can also create your own. The following table shows you how to list the aliases and create your own.

CommandComments
Alias
PS C:\> alias

Provides a listing of all aliases. It includes built-in aliases and user-defined aliases. This returns the same data as get-alias and get-command -commandtype alias.
set-alias alias command
PS C:\> set-alias gh get-help

Creates or changes an alias. The example creates an alias named gh that can be entered instead of the command get-help.

Discovering Windows PowerShell Commands

Few people will master all of the PowerShell commands; however, you can master a basic self-discovery method used to learn and master any specific command. This method includes three important commands, as described in the following table.

PowerShell Discovery CommandsComments
get-command [switches]
PS C:\> get-command
PS C:\> get-command -commandtype
cmdlet
PS C:\> get-command -commandtype
alias
PS C:\> get-command -commandtype
function

The get-command cmdlet shows all of the possible commands. You can list the cmdlets, aliases, or functions separately as shown by the three examples.
get-help
get-help command [-full |
-detailed | -examples]
PS C:\> get-help
set-executionpolicy -full
PS C:\> get-help get-process
-detailed
PS C:\> get-help start-service
-examples

The get-help command provides access to a rich set of built-in help.

You can follow get-help with the name of any command. By default, it provides basic help. However, you can also add the -full, -detailed, or -examples switches.

The -detailed switch expands the basic information with more details and includes examples.

The -full switch provides verbose help, including technical information. It includes all available help information including examples. It often includes online links for more information.

The -examples switch shows a brief synopsis with examples.
get-member
command or object | get-member
PS C:\> get-service | get-member

$variable| get-member
PS C:\> $profile | get-member

The get-member command provides information about properties and methods you can use with the command. Almost all of the commands are objects, meaning they have properties and methods. Properties are descriptions that you can retrieve and sometimes configure. Methods are actions you can take with the item.

There are also many help topics available on conceptual PowerShell topics. These are called “about” topics and they all start with about_.

List all about topics.
PS C:\> get-help about_*

The * (asterisk) wildcard can be used to list all about topics (all topics that start with about_).
View any specific about topic.
get-help about_topic
PS C:\> get-help about_execution_policies

You can then use the get-help command to view the about_topic.

 
Others
 
- Exchange Server 2010 : Managing Mailbox Databases (part 2) - Properties of a Mailbox Database
- Exchange Server 2010 : Managing Mailbox Databases (part 1) - Viewing Mailbox Databases, Creating Mailbox Databases
- Exchange Server 2010 : Mailbox Storage - Determining the Number of Databases, Allocating Disk Drives
- Exchange Server 2010 : Getting to Know Exchange Database Storage (part 2)
- Exchange Server 2010 : Getting to Know Exchange Database Storage (part 1)
- Understanding SharePoint 2013 authentication (part 3) - Understanding app authentication flow in SharePoint 2013
- Understanding SharePoint 2013 authentication (part 2) - Understanding how SharePoint 2013 authenticates apps
- Understanding SharePoint 2013 authentication (part 1) - Understanding user authentication in SharePoint 2013
- Sharepoint 2013 : Automating tasks with workflows - Importing Visio workflows into SharePoint Designer
- System Center Configuration Manager 2007 : Client Management - The ConfigMgr Client Agent
 
 
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
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us