Wednesday, July 18, 2018

PowerShell 1.7.2 - Update Help and Save Help



Update-Help checks the version of the help files on your computer. If you do not have help files for a module or do not have the newest help files for a module, Update-Help downloads the newest help files from the Internet or a file share and installs them on your computer in the correct module folder.



Save-Help cmdlet downloads the newest help files for Windows PowerShell modules and saves them to a directory that you specify. This feature lets you update the help files on computers that do not have access to the Internet, and makes it easier to update the help files on multiple computers.

#save help
help save-help -showwindow
Save-Help -destination D:\Trainings\help -force

#updating help from source
Update-help -source D:\Trainings\help -force



Powershell 1.7.1 : Get-help online and Get-help show window


get- help invoke-command -online

This command displays the online version of the help topic for the mentioned cmdlet in your default web browser.




show window displays output in a window
get-help get-eventlog -showwindow
get-help about_switch -showwindow

Displays output as below





PowerShell 1.7 : Using Help in Powershell

Displays information about Windows PowerShell commands and concepts. To get help for a
Windows PowerShell command, type `Get-Help` followed by the command name, such as: `Get-
Help Get-Process`. To get a list of all help topics on your system, type `Get-Help * However, starting
in Windows PowerShell 3.0, the modules that come with the Windows operating system do not
include help files. To download or update the help files for a module in Windows PowerShell 3.0,
use the Update-Help cmdlet.

Get-help
Update-help

help get-service
help get-service -detailed
help get-service -full
help get-service -examples
The Detailed parameter displays the detailed view of the help topic, which includes parameter descriptions and examples.
The Full parameter displays the full view of the help topic, which includes parameter descriptions, examples, input and output object types, and additional notes.
The Detailed and Full parameters are effective only for the commands whose help files are installed on the computer. They are not effective for the conceptual ("about_") help topics.
The Examples parameter displays only the NAME, SYNOPSIS, and all Examples. You can not specify an Example number because the Examples parameter is a switch parameter.


PowerShell 1.6 : Alias , Get-alias , what is % in Powershell , what is ? in Powershell

Get-Alias cmdlet gets the aliases in the current session. This includes built-in aliases, aliases that you have set or imported, and aliases that you have added to your Windows PowerShell profile.
By default, Get-Alias takes an alias and returns the command name. When you use the Definitionparameter, Get-Alias takes a command name and returns its aliases.
what is % and ? in Powershell alias 
% - foreach-object
? - Where-object 



Powershell 1.5 : PowerShell ISE and File Extension

PowerShell ISE

The Windows PowerShell Integrated Scripting Environment (ISE) is one of two hosts for the
Windows PowerShell engine and language. With it you can write, run, and test scripts in ways that
are not available in the Windows PowerShell Console

Extension : PowerShell scripts (files suffixed by .ps1 )

Below is how ISE looks Like with
Script Pane (In White), Execution Pane (In Blue), On right side you can find the cmdlets from each Module


Powershell 1.4 : About Cmdlets and get-command

In PowerShell, administrative tasks are generally performed by cmdlets (pronounced command-
lets).Cmdlets are specialized commands in the PowerShell environment that implement specific
functions. Cmdlets follow a Verb-Noun naming pattern, such as Get-ChildItem, helping to make them
self-descriptive. Sets of cmdlets may be combined into scripts & executable

Get-command ---> gives all commands that includes cmdlets,functions ,alias,workflow...etc

#lists only cmdlets 
get-command -CommandType cmdlet -ListImported 



Get commands with a verb
get-command -verb export





Get command with a Noun
get-command -noun ACL

Featured Posts

Adding Accesspolicy to KeyVault for Service Principal Using Portal and Powershell

  Scripts path : https://drive.google.com/drive/folders/1sbBpnVFgXhUIXLdf2E9heyWDeU2f9427?usp=sharing  Adding Accesspolicy to KeyVault for S...