Friday, November 14, 2008

PowerShell Free Editor - PowerGUI

You can download from here PowerGUI.

Common Commands

Get-Command Get*

Get-Command -Name Get-PSDrive -Syntax

Get-Help about*

Get-Alias Set-Alias

Get-ChildItemPath C:\Windows\System32 Out-Host –paging

Remove-Item C:\temp\New.Directory –Recurse

Invoke-Item C:\boot.ini

Copy-Item -Path C:\New.Directory -Destination C:\temp -Recurse -Force –Passthru

Get-Process Get-Member -MemberType Properties Out-Host –Paging

Get-Process Format-Table

Get-Location

Set-Location -Path c:\Windows –PassThru

Get-WmiObject -Class Win32_OperatingSystem -Namespace root/cimv2 -ComputerName . Get-Member -MemberType Property

New-Object -TypeName System.Diagnostics.EventLog -ArgumentList Application

New-Object -ComObject WScript.Shell

New-Object -ComObject WScript.Network

New-Object -ComObject Scripting.Dictionary

New-Object -ComObject Scripting.FileSystemObject

$lnk=$WshShell.CreateShortcut("$Home\Desktop\PSHome.lnk")

Where-Object –FileterScript ($_.Value -lt 3)

ForEach-Object –Process ()

Sort-Object –Property –Descending

$env:PATH

Rem ---- List MSI

Get-WmiObject -Class Win32_Product -ComputerName . Format-Wide -Column 1

Rem ---- To install MSI

(Get-WMIObject -ComputerName PC01 -List Where-Object -FilterScript {$_.Name -eq "Win32_Product"}).InvokeMethod("Install","\\AppSrv\dsp\NewPackage.msi")

Rem ---- To uninstall MSI

(Get-WmiObject -Class Win32_Product -Filter "Name='ILMerge'" -ComputerName . ).InvokeMethod("Uninstall",$null)

2 comments:

Anonymous said...

Devfarm Software just released it's PowerShell Script Editor as freeware. It's worth a try. http://www.powerse.com

Anonymous said...

There is another nice free powershell editor. It can be found at http://www.powerse.com

Be A Developer That Uses AI

Developers will not be replaced by AI, they'll be replaced by developers that use AI. Generative AI tools are revolutionizing the way de...