PowerShell & Powercat

PowerShell

PowerShell Basic Commands

Get-Help <command To neet Help>
Kali
WIn

To get the list of Updates −

  • Get-HotFix and to install a hot fix as follows

  • Get-HotFix -id kb2741530

Cmdlet vs Command

Cmdlets are way different from commands in other command-shell environments in the following manners −

  • Cmdlets are .NET Framework class objects; and not just stand-alone executables.

  • Cmdlets can be easily constructed from as few as a dozen lines of code.

  • Parsing, error presentation, and output formatting are not handled by cmdlets. It is done by the Windows PowerShell runtime.

  • Cmdlets process works on objects not on text stream and objects can be passed as output for pipelining.

  • Cmdlets are record-based as they process a single object at a time.

Cmdlet

New-Item cmdlet is used to create a directory by passing the path using -Path as path of the directory and -ItemType as Directory.

Copy-Item cmdlet is used to copy a directory by passing the path of the directory to be copied and destination path where the folder is to be copied.

Remove-Item cmdlet is used to delete a directory by passing the path of the directory to be deleted.

Move-Item cmdlet is used to move a directory by passing the path of the directory to be moved and destination path where the folder is to be moved.

Rename-Item cmdlet is used to rename a folder by passing the path of the folder to be renamed and target name

Get-Content cmdlet is used to retrieve content of a file as an array.

Test-Path cmdlet is used to check existence of a folder.

PowerCat

Netcat: The powershell version. (Powershell Version 2 and Later Supported)

Parameters:

Basic Connections

Last updated