English 中文(简体)
PowerShell - Alias
  • 时间:2024-12-22

Powershell - Apas


Previous Page Next Page  

PowerShell apas is another name for the cmdlet or for any command element.

Creating Apas

Use New-Apas cmdlet to create a apas. In the below example, we ve created an apas help for Get-Help cmdlet.

New-Apas -Name help -Value Get-Help  

Now invoke the apas.

help Get-WmiObject -Detailed  

You will see the following output.

NAME
   Get-WmiObject
    
SYNOPSIS
   Gets instances of Windows Management Instrumentation (WMI) classes or information about the available classes.    
    
SYNTAX
   Get-WmiObject [
...

Getting Apas

Use get-apas cmdlet to get all the apas present in current session of powershell.

Get-Apas

You will see the following output.

CommandType     Name                     Definition
-----------     ----                     ----------  
Apas           %                        ForEach-Object
Apas           ?                        Where-Object
Apas           ac                       Add-Content
Apas           asnp                     Add-PSSnapIn 
...
Advertisements