Archive for the 'PowerGUI' Category



Compile PowerShell scripts to exe

Script compilation to executable files is one of the features we have added in PowerGUI Pro 3.0.

You would likely want to use compile a script when you want to share it in the enterprise environment and you are not sure whether the other person is comfortable running scripts or you simply don’t want risking someone modifying the code.

To compile a PowerShell script:

  1. Open the script in PowerGUI Pro Script Editor,
  2. On the Tools menu, click Compile Script,
  3. Then specify the name and path for the exe file you want to create:

PowerShell Compiled scripts

The additional options you get are:

  • Show or hide the PowerShell Console window when executing the script,
  • Automatically close or keep the console window (if you do want to show it),
  • Protect the script source code by obfuscating it using a password you specify,
  • Add other PowerShell scripts  to the exe (if you have script which your main script is using).

[UPDATE] If your script access parameters – so will the exe file it generates. So for an executable generated from a script like:

param ($MyParam1, $MyParam2) "MyParam1: $MyParam1""MyParam2: $MyParam2"

You may use a command line like:
c:\Generated.exe -Arguments -MyParam2 "Value2" -MyParam1 "Value1"

 

To try this feature, you can install a trial version of PowerGUI Pro from here.

(Screenshot taken from the original PowerGUI 3.0 announcement which lists a lot of other great features we shipped in that release)

Quest Software, Kirk, PowerGUI, PowerShell

The news of Kirk Munro leaving Quest has generated so much emotional response, often including bashing of Quest Software, that I thought I have to write this quick post to summarize my opinion on the situation. (And by the way, for the record, I was not the manager Kirk mentioned in his blog post. :))

Kirk has been a tremendous member of the PowerGUI team, and when your position gets cut it is not fun at all – so I understand the tendency of us seeing this as the “big evil ungrateful corporation doing bad things” kind of thing.

At the same time, I don’t think this is what actually happened.

For many years Quest has been the major contributor to the PowerShell community and this contribution continues. Yes, being a public company Quest has to protect the interests of its shareholders and when the economy is not doing well some of the expenses have to get cut, and PowerGUI became one of the products which budget got adjusted. This is the sad reality here and such things happen. From what I know, Quest handled this unfortunate situation quite well giving Kirk a good package and offering options to stay involved.

Back in 2006, in the Monad days, Quest supported me: giving me the investment I requested, and allowing me to spend my work time to start PowerGUI and AD cmdlets development. These tools were created free and remain free. You are not even required to provide your email address and get marketing emails for using the tools. For a lot of IT professionals I know – their PowerShell life started with either (or both) of these tools. I have met many Active Directory administrators who told me that QAD cmdlets literally had changed the way they work.

PowerGUI VSX is our free and open source effort to bring PowerShell into Visual Studio.

PowerGUI.org website – again, created and maintained with Quest investment, is the most active PowerShell community in the internet (more active than Microsoft’s PowerShell newsgroups) – where many people get their PowerShell questions answered every day.

Quest is the major sponsor of the PowerShell Deep Dive – which remains significantly subsidized (just check out the discount you get there compared to regular TEC price). Anyone who was at the event can attest that this was one of the most advanced, intense and amazing PowerShell experience they’ve ever had.

From what I know, in none of these efforts Quest is abusing the relationship. Instead the company keeps doing what it can to give back to the community and make lives of IT professionals easier.

From my personal perspective, my career and visibility in the IT community got catapulted to stratosphere thanks to these investments. Seriously, how many IT pros knew about me or Kirk before PowerGUI and AD cmdlets? Both of us became celebrities thanks to Quest’s contributions to PowerShell.

So, am I sad that this happened and Kirk had to leave? Absolutely. I enjoyed working with Kirk and he is a good friend of mine. And yes without Kirk, the rest of the PowerGUI team including myself will have to work harder to keep the project advancing.

Does this make Quest evil, greedy and bad to the PowerShell community? I don’t think so. I really don’t see any companies besides maybe Microsoft investing so much in keeping PowerShell growing, and I think we should all keep that in mind. If you guys like what we are doing here at Quest for the PowerShell community – help us: buy the commercial versions of the products, be active in our forums, spread the news and love towards these efforts – this will help us keep going and protect us against any further cuts.

Thank you for listening.

Fix PowerGUI shortcuts in Start menu

ISSUE

PowerGUI 3.0 accidentally shipped with Windows Start menu shortcuts being called just “Administrative Console” and “Script Editor”. Which means that if you are used to starting applications by typing keywords in Start menu, you won’t be able to find the tools by typing PowerGUI:

SOLUTION

Open PowerGUI Script Editor (or native PowerShell command line), run the following command in the PowerShell Console window:

dir “$($env:ProgramData)\Microsoft\Windows\Start Menu\Programs\PowerGUI” | where {$_.Name -notmatch “PowerGUI”} | Rename-Item -NewName {“PowerGUI ” + $_.Name}

This will rename the shortcuts for you:

TechEd Video: NetApp’s Glenn Sizemore Demonstrates their PowerPack

If you have not seen yet the amazing PowerShell work which NetApp team has done to vastly improve their storage manageability and get more agile – here’s a quick video interview and demo which I recorded at TechEd 2011 in Atlanta last month:

If this got you interested, you can download the NetApp PowerPack for free here.

For those who want some additional sqoop here are:

PowerGUI 2.4 gets a great review by Windows IT Pro magazine

Review of PowerGUI - PowerShell script editor, debugger, custom development environmentIt’s not often that you get an independent product review with summary like this one:

PowerGUI Pro 2.4
PROS: Cost-effective; easy to install and use; removes barriers to implementing in-house PowerShell solutions
CONS: None to speak of
PRICE: $199 per installation
RECOMMENDATION: Get it, and use it. I’ve become addicted to PowerGUI Pro, especially the PowerGUI Script Editor

Yet, this is exactly what Windows IT Pro magazine has just published. And they were reviewing version 2.4 – without all the 3.0 functionality taking PowerGUI to the new level. Saying that I am excited would probably be an understatement.

And this is even better, Ryan Femling from Windows IT Pro was actually actively using the tool – rather than relying on some sort of vendor marketecture (I did not even know this review was in the works) and his review is solely based on his scenarios and applications he found to be important for his work.

Read full review here and I bet there is a good chance that you might learn a couple new things even if you are already an active PowerShell or PowerGUI user!

PowerGUI Editor 2.4 and AD cmdlets 1.4 compatibility issue

[UPDATE] This issue has been fixed in AD cmdlets 1.5.1 – please download the latest version of AD cmdlets here.

We have found a compatibility issue between PowerGUI Script Editor 2.4 and AD cmdlets 1.4 (these are the current versions at the time I am writing this post.)

SYMPTOMS

You execute a script which is using QAD cmdlets. The first time the script executes fine. However when you try to execute it again, the script fails with the “Object reference not set to an instance of an object.” error.

ISSUE

The issue is related to the way QAD cmdlets are handling initialization and unloading of the snapin.

SOLUTION

Set PowerGUI Script Editor to not reset PowerShell runspaces between the debug sessions:
1. Go to Tools / Options / Debug Options,
2. Select the Run all scripts in the same runspace option.
3. Restart PowerGUI Script Editor.

We are sorry for the inconvenience and are working on fixing the issue in the next releases.

Intellisense patch for PowerGUI Script Editor 2.4

If you experience intellisense issues when working with Exchange cmdlets in PowerGUI Script Editor (and by issues I mean that you have the Exchange snapin selected in File / PowerShell Libraries, and cmdlets work in your scripts just fine but intellisense does not appear) – suffer no more, there is now a fix available.

To get the patch simply:

  1. In PowerShell Script Editor, on the Tools menu, click Find Add-Ons Online,
  2. In the dialog box search for ‘fix‘,
  3. Select and Install the PowerGUI 2.4 IntelliSense issue fix (Exchange cmdlets).

 


My Recent Tweets

  • Nice little Chrome add-on showing which emails in your inbox have tracking codes in them: lnkd.in/b86K5P2 1 week ago
  • If you need help with business strategy, marketing and sales enablement, Liana and her COPERNICI are finishing a few… copernici.com 2 weeks ago
  • One of the leading telecommunications companies Axiata launches GSM API platform based on WSO2 integration platform lnkd.in/bcY95sS 3 weeks ago
  • New release of App Factory - the PaaS powering our WSO2​ App Cloud. As usual, announcements and discussions are on t… lnkd.in/bpxrMsT 1 month ago
  • Looks like some hotmail servers were significantly delaying email last week. We had one customer email get to us 6 days after he sent it. :( 1 month ago

Legal

The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

March 2015
M T W T F S S
« Jan    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Follow

Get every new post delivered to your Inbox.

Join 2,433 other followers

%d bloggers like this: