Monday, August 29, 2011

Join PowershellGroup.Org/newdelhi

 

Hi Guys,

Please join our New Delhi group at http://powershellgroup.org/NewDelhi for upcoming events, meeting etc.

you can also join us at facebook and twitter. Links for facebook and twitters are below:

facebook: http://www.facebook.com/groups/254997707860848/

twitter: http://twitter.com/#!/AmanDhally

Thanks

Aman Dhally

PowerShell GUI Script Editors

 

Hi,

Few days ago i was searching for free powershell script editors. These GUI editors may help us in learning powershell. These GUI script editors are very useful in viewing scripts and editing scripts and debugging the powershell scripts.

In Microsoft windows notepad is a default powershell script editor. If you double click  any PS1 (powershell script) file it always opens in notepad.

Why to use GUI scrip Editors?

Below is the list of few benefits of using PowerShell GUI editors.

  • Syntax Colour coding.
  • you can view and run the script in the same program window.
  • Auto completion of commands.
  • Comes with Intellisense.
  • Multiple tabs

List Some best Free PowerShell GUI Editors.

  1. PowerGui Script Editor
  2. PowerShell ISE
  3. PowerSE

 

PowerGUI Script editor

Website: http://powergui.org/index.jspa 

Download Link: http://community-downloads.quest.com/powergui/Release/3.0/PowerGUI.3.0.0.2015.msi

Screenshot:

PowerGui

PowerShell ISE Script Editor

PowerShell ISE script editor comes inbuilt in Windows7 and runs on Windows XP and later versions of Windows, except for Server Core installations of Windows Server.

Screenshot:

PowerShellIse

PowerSE Script Editor

Website: http://powerwf.com/

Download link: http://powerwf.com/misc/download-se.aspx?prod=PWF-OTH-EDT

Screenshot:

PowerSe

Download any of them and try them hope you like it :)

Thanks

Aman Dhally

Thursday, August 25, 2011

Thanks to powerscripting.net

 

HI Guys,

I want to say thanks to Jon and Hal from PowerScripting.net for mentioning our New Delhi user Group in there Podcast.

They mentioned our Group in Episode 158, you can download the podcast from here

 

Thanks

Aman Dhally

Wildcards in PowerShell

 

Hi Guys,

Before start learning PowerShell first we need to clear or learn some basic logics and basic  steps of scripting, that’s why I decide to learn about wildcards first. So Lets Start

Question: what are wildcards?

Answer: A wildcard character can be used to substitute for any other character or characters in a string.

Question: Which wildcards are available in PowerShell and what are there meaning?

Answer: The wildcards are available in PowerShell are * ? and []

Wildcard Description
* matches Zero or More characters
? match Exactly one character
[a-z] matches a range of characters
[abc] matches specified character

 

Examples

Wildcard *

Lets Run the following command: Dir * it shows all file and folders in current Directory 

 wildcards-1

Let run another command: Dir *.* it will show all files in current directory. *.* means all file with any file extension

wildcards-2

Lets search for all .mp3 files in our current directory.: Dir *.mp3

wildcards-3

Now lets search for all file and folders which starts with B: Dir b* 

Capture4

-----------------------------------------------------------------------------------------------

Wildcard ?

Now let try our another wildcard character ? , in this example we are searching for a .txt file which names end with at and we forget what  is the name: dir ?at.txt   this command return all file which has at.txt at the end.

wildcards-5

Let See the another Example, in this example i am looking for a txt whose name is 3 character long. Dir ???.txt

wildcards-6

Now lets join our both wildcards and search for all .mp3 and .mp4 available in our current directory: dir *.mp?

wildcards-7

-----------------------------------------------------------------------------------------------

Wildcard [] matches specify range of characters

In [] wildcard we can specify a range of characters to match , for example if we specify [a-d] then it means all alphabets between A-D (A,B,C,D) or if we specified [1-8] then it means match all digits between 1-8 (1,2,3,4,5,6,7,8)

Dir: [a-z]at.txt  this command check for all file start with a-z character and at.txt at the end

wildcards-8

In another example lets search for all folder starts whose name start from 1-6

Dir [1-6]

wildcards-9

-----------------------------------------------------------------------------------------------

Wildcard [] matches specify characters

In this wildcard rather then provide a range we specify which characters we want to match. for example we want to match character start with b,c,d then we can specify it as [acd] then it matched only files or folders starts with A,C,D and ignore everything else.

For example: dir [bcl]ook.txt , this command look for all files start with B,C,L and have ook.txt after it

wildcards-10

-----------------------------------------------------------------------------------------------

 

I hope this article helps you to understand Wildcards a little bit :)

Thanks for reading it

Regards

Aman Dhally

 

Note: Dir command is an alias of Get-Childtem in PowerShell

Wednesday, August 24, 2011

Welcome to New Delhi PowerShell User Group

Hi, Guys
Welcome to New Delhi PowerShell User Group
After Creating the Group for New Delhi PowerShell User Group. Now I am creating a Blog for it.
In this Blog I will post Tips n Trick on PowerShell and we will learn PowerShell Together.

So wish each other Best Of Luck

Thanks
Aman Dhally