Showing posts with label update-help. Show all posts
Showing posts with label update-help. Show all posts

Monday, October 14, 2013

Powershell Tips : Use Only Powershell V2 cmdlets , with PowershellV3 Installed.

 

I use Windows 7 (64 bit) with Powershell V3 installed on it. Most of our users are still on PowerShell v2, Sometime when I am writing scripts for them i use some PowerShell v3 cmdlets accidently.

Normally I write the initially version of all scripts on PowerShell console and I do test my all script in the console only.

So I thought there must be a way to run PowerShell.exe with Version 2 only.

I found the solution and i thought I should share it with You.

It’s simple, Just run “Powershell.exe –Version 2” and this will open a PowerShell console with V2 cmdlets only.

Let’s test it.

When i run $PSVersionTable  in my PowerShell console, you can see that  my PSversion is 3.0.

14-10-2013 17-07-33

Now lets run “Powershell.exe –Version 2” .

14-10-2013 16-46-57

and new PowerShell console will open and let’s check it’s $PSVersionTable.

You can see that this PowerShell version of this console is 2.0.

14-10-2013 17-07-59

Now let’s check one more thing.  Let’s see if version 2 is having Version 3.0 cmdlets or not (just to make our self bit  more confident).

Let’s search for all cmdlets those has the word Update. The Version 3 has a new cmdlet named “Update-Help”.

Get-Command *update* -CommandType cmdlet

14-10-2013 17-08-23

and then run the same command on v2 PowerShell console.

You can check that , Update-Help cmdlet is not available on V2 console :)

14-10-2013 17-08-55

Now i can use it and create a V2 script more confidentiality, without worrying of using v3 cmdlets accidentally. . :) 

Note: I tested this on Windows 7 (64 bit) with PowerShell v3 installed.

Thanks for reading and your time,.

Thanks

Aman Dhally

clip_image001 clip_image002 clip_image003 clip_image005  clip_image007

Wednesday, February 6, 2013

What’s New in Windows PowerShell ISE 3.0


Hi, Microsoft has added lots of new feature in “Windows PowerShell ISE 3.0” . If you are “Powershell ISE” lover then you should try this new version of “Powershell ISE”. I am using windows8 and it has “Powershell V3” and “Powershell ISE v3” installed by default.

So what's new ? in New PowerShell ISE 3.0?

  It has the main feature which was lacking in ISE Version 2
  1. Intellisense.
      • 06-02-2013 12-50-03
      • 06-02-2013 12-45-52
  2. We can use and Insert Snippetstoo.
      • 06-02-2013 12-47-17
      • 06-02-2013 12-47-34
  3. Commands tab
    • In command tab, we can see List of all modules available. we can search for specific cmdlets.We can build command right on the Commands tab and directly run from there or insert to the script pane.
    • 06-02-2013 12-51-30
  4. Update Powershell Help
    • Now we can “Update Powershell Help” using Powershell ISE 3.0, it is very simple.
    • Click on “help” and click on “Update Windows PowerShell Help” {it run update-help cmdlet actually }
    • 06-02-2013 12-54-39
    • and it will start updating all Powershell Help files.
    • 06-02-2013 12-55-29
  5. New Menu bar Items
    • Microsoft had added two new menu bar items.
      • Tools
      • Add-ons
  6. Themes
    • Now we have a option of customise how our Script pane and Console pane look like.
    • PowerISE 3.0 has 6 inbuilt themses
      • click on Tools
      • Click on Options
      • 06-02-2013 13-03-59
      • Now you can see that default theme “Dark console, Light Editor” is selected.
      • to change the theme , click on “Manage Themes”
      • and select the theme which you want to apply and click on OK
      • 06-02-2013 13-16-19
      • and click on APPLY
      • and now everything will be look like “Matrix movie” Winking smile
      • 06-02-2013 13-17-26
That’s all for now Smile  
Thanks
Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007