Archive for the 'PowerGUI' Category

PowerPack Creation Manual

Kirk has published a pretty extensive reference manual on PowerPacks (PowerGUI add-ons), what they are, how to customize them, and how to create the ones of your own.

Great timing considering that you still have 5 days to create a PowerPack and submit it to the PowerPack Challenge!

Check out the document here.

New enterprise PKI management console

Certificate management used to be tough. There have not been a single tool to manage all the aspects of it and administrators had to launch all these certsrv.msc, certtmpl.msc, certutil.exe, ocsp.msc, pkiview.msc, and so on. We had no bulk operations, had to manage each certificate authority (CA) in a separate MMC snapin, and so on.

That is now all a thing in the past with the new PowerGUI/PowerShell-based certificate management admin console created by PowerShell MVP Vadims Podāns (here’s English translation of his blog) and shared for free here.

Here’s a very quick summary of some of the features his tool has:

  • Certificate Authorities management:
    • CRL Distribution Points (CDP)
    • Authority Information Access (AIA) settings
    • Review CRLs
    • Publish new CRLs
    • Change CRL publishing periods including overlap settings
    • Revoked Certificates
    • Issued Certificates
    • Pending requests
    • Failed requests
    • Issued certificate templates
    • Revoke/unrevoke certificates
    • Issue or deny pending requests for certificates
    • Add/remove certificate templates to issue
    • Change CRL/CRT/OCSP URL priorities
  • Local certificate store management:
    • Import/Export certificates using various certificate types (such CER/pkcs12/pkcs7/SST)
    • Copy/move certificates between stores
    • Delete certificate from store
    • Validate certificates passing them through certificate chaining engine
    • Sign files
  • Online Certificate Status Protocol (OCSP) Responders management
    • Review and change OCSP Responder settings
    • Change OCSP URL priorities

All of these support bulk operations, filtering, and reporting. All are available with their source PowerShell code for your reference and scripting.

Could you ask for more? Please submit your feedback to Vadims – this will help him improve the pack.

Read more about the pack, see the screenshots, and download the tool here.

Are you also into PowerShell and have a great idea of a tool to make someone’s life easier – go for it – create your PowerPack and submit it to the contest!

Tags: , , , , , ,

Virtu-Al PowerPack – A must-have tool for VMware

Left-hand tree from Virtu-Al's VESI/PowerGUI virtualization management toolPowerPack Challenge 2009 got its first contestant and it is absolutely fantastic.

If you are an administrator managing VMware infrastructure – this is a great free addition to your arsenal. Just look at the screenshot of the navigation tree. The tool is just an amazing collection of super-useful reports on VMware hosts, guest machines, datacenter, resource pools and clusters, and goes beyond that by adding licensing information and even a virtualization tip of the day!

You can download Alan’s PowerPack here. Read more about the pack and send your feedback here.

Good thing there’s more than one prize for the contest. ;) So if you are into PowerShell and have a great idea of a tool to make someone’s life easier – go for it – create your PowerPack and submit it to the contest!

Tags: , , , , ,

PowerPack Challenge: The Winning Strategy

Post early and actively collect and incorporate feedback – and you can substantially increase your chances of winning the first prize in the PowerPack Challenge 2009.

Here’s how Jonathan Medd got his Best PowerPack award last year (in 2008):

  1. He posted his Exchange 2003 PowerPack really early when the contest was only starting.
  2. The pack got tons of interest, was featured in podcasts and blogs, and Jonathan received a lot of feedback and even contributions from Shay and Aleksandar.
  3. He kept incorporating feedback and contributions throughout the contest.
  4. By the contest deadline, his PowerPack got well ahead of more recent entries in both quality and feature richness.

So if you have something in the works – be agile. Go ahead and post it. Tell the world, get feedback, and keep improving what you’ve got.

Read more about the contest here. Participate, have fun, win great prizes!

Tags: , ,

Video on creating a PowerPack

If you are considering participating in the PowerPack Challenge contest (which you should ;) ) this quick video by Darin will help you get started:

Darin walks you through the process of customizing PowerGUI admin console, exporting the new functionality as a PowerPack, and sharing it on the web.

  1. Check it out,
  2. Think about what you do day to day at work and what would be the graphical console of your dream,
  3. Create it,
  4. Submit it to the contest,
  5. And become one of the winners! :)

Tags: , , , , ,

Better Together: PowerShell 2.0 and PowerGUI

Now that PowerShell v2 is officially released for all platforms: XP, 2003, Vista, 2008 (and obviously Windows 7 and Server 2008 R2) – HURRAY!!! -  let me quickly summarize how you can start immediately getting benefits from the new functionality once you upgrade PowerShell to 2.0 on the machine on which you use PowerGUI:

So what are you waiting for? Download PowerShell 2.0 now! :)

The KB article also has a list of what’s new functionality for PowerShell 2.0. And this video from Kirk highlights most of it in action.

PowerPack Challenge 2009 Begins

bn-powerGUI-202x160Win $1000 and become a rockstar by creating a PowerPack and sharing it with the community!

PowerPacks are open-source PowerShell add-ons for PowerGUI Admin Console. PowerGUI.org Library has about 60 of them giving you customizable extensible user interfaces (and PowerShell libraries) to manage systems ranging from Exchange to Operations Manager, from VMware to Skype, from Twitter to Facebook.

Each year we are holding a competition and giving away prizes ($1000 to 2 winners, and $500 to the first runner up) to the most active participants and best PowerPacks.

PowerPack Challenge started this week and will last till November 15.

The judges this year include:

And with the popularity of PowerGUI, this contest is not only a great scripting challenge , but is also an incredible way to bring value to thousands of administrators world-wide.

If you are interested in the submissions we had last year and who became the winners in 2008 – you can read the last posts here.

  1. So think about the IT systems you manage and how you can make this management easier.
  2. Read the contest details at the PowerPack Challenge web page.
  3. Submit your PowerPack.
  4. Win the prizes and become a rock star!

PowerGUI surpasses 500K downloads

The most popular free PowerShell tool (or a set of two tools: PowerShell Script Editor/Debugger and Graphical Administrative Console) got downloaded more than half a million times. Wow…

You can actually track the download counter yourself when you go to PowerGUI downloads page:

PowerGUI-download-counter

Now, 500,000 downloads is not equal to 500,000 users. Someone could have tried it and may not be using it today (although I would recommend that you give it another try – we are getting better with each new release!) and this is total downloads number of all releases starting the first beta we made available in early 2007. So if you have been with us all these years we have probably counted you quite a few times here! ;)

But even with this disclaimer, 500,000 is a huge number! Thanks to everyone using the tool, participating in our online PowerShell community, submitting your PowerPacks to the add-on library, and just helping others on the discussion forum! It is a big day for all of us!

What’s new in PowerGUI 1.9.5

Yesterday we shipped the latest release of PowerGUI – the most popular PowerShell IDE and Admin console out there. ;) Both components got improved.

Administrative console now has:

  • Ability to automatically check for PowerPack updates when it starts – so if you are a PowerGUI user you can now be sure that all your PowerPacks (PowerGUI addons from PowerGUI library or any other intranet/internet location) are up to date.
  • Improved grid performance – we are now much faster when displaying large datasets (a lot of objects with many properties.)
  • Progress bars – you can use write-progress cmdlet in your PowerPack code to display progress bar for long operations.

Script Editor and Debugger:

  • Also write-progress support – see Alan’s video on how nice it is compared to the one on native blue window. ;)
  • Customizable tab settings: You can have all tabs in the editor replaced with specified number of spaces. On the Tools menu, click Options, then on the Text Editor tab select whether you want to substitute tabs with spaces and the number of spaces.
  • Support the prompt function in the PowerShell Console window: if you have customized your PowerShell prompt – we will now use your custom prompt in our console pane.
  • Collapse regions in the Admin console or the Script Editor: all regions are collapsed when reopening a file or a script.

And we have obviously fixed a bunch of issues reported at our community forums.

Download PowerGUI 1.9.5 from the website today or wait about a week till we turn on automated updates for existing customers.

Tags: , ,

Add filepath to ConvertTo-HTML

Converting PowerShell data into an HTML report and save it to disk with no need for extra pipeline has long been my dream. Unfortunately, there’s no native Export-HTML cmdlet (unlike, say, Export-CSV), and ConvertTo-HTML does not have -Path parameter and only displays the html code on the screen (very useful ;) ) unless you pipe it to Out-File.

So being inspired by Kirk adding parameters to Import-CSV and using PowerShell 2.0 code-snippets, I created my Export-HTML function, which behaves exactly like ConvertTo-HTML but adds optional -Path parameter to specify the output file.

Download it, copy/paste the function into PowerShell (or dot-source it, or include it in your PowerShell profile) and you will be able to do something like:

Get-Process | Export-Html -Path C:\pr.htm

or

Get-Process |
    Export-Html C:\pr.htm -Title My Processes

or

Get-Process |
    Export-Html C:\pr.htm -Property Name, Handles -Title My Processes

You can download the code here, or copy/paste it from the text below.

You may also consider renaming the function name from Export-HTML to ConvertTo-HTML (or use set-alias to make them the same thing), because the -Path parameter is optional, and old behavior of outputting HTML code to the console/pipeline is supported as well as all native parameters.

Here’s how I created this proxy function:

  1. Downloaded and installed PowerShell 2.0 code snippets.
  2. Used the function (proxy) snippet to generate the proxy for ConvertTo-
    HTML
    .
  3. Added Path to the parameters section:
  4.     [Parameter(Position=0)]
        [Alias('PSPath', 'FilePath')]
        [ValidateNotNullOrEmpty()]
        [System.String]
        ${Path},
    
  5. Added a variable to store modified PowerShell code to be executed:
  6. $scriptCmdPipeline = ''
  7. Added parameter handling in which I (if Path is present) append the Out-File code to the pipeline:
  8.         if ($Path) {
                $PSBoundParameters.Remove('Path') | Out-Null
                $scriptCmdPipeline += " | Out-File -FilePath $Path"
            }
    
  9. Got the original command-line for ConvertTo-HTML
  10.         $scriptCmd = {& $wrappedCmd @PSBoundParameters}
    
  11. And added this new pipeline to it:
  12.         $scriptCmd = $ExecutionContext.InvokeCommand.NewScriptBlock(
                    [string]$scriptCmd + $scriptCmdPipeline
                )
    

The rest was handled by the code snippet.

Here’s the resultant code:

#Requires -Version 2.0

<#
    Export-Html behaves exactly like native ConvertTo-HTML
    However it has one optional parameter -Path
    Which lets you specify the output file: e.g.
    Get-Process | Export-Html C:\temp\processes.html
#>

function Export-Html {
[CmdletBinding(DefaultParameterSetName='Page')]
param(
    [Parameter(ValueFromPipeline=$true)]
    [System.Management.Automation.PSObject]
    ${InputObject},

# Adding Path parameter 
# (made it Position 0, and incremented Position for others)
    [Parameter(Position=0)]
    [Alias('PSPath', 'FilePath')]
    [ValidateNotNullOrEmpty()]
    [System.String]
    ${Path},

    [Parameter(Position=1)]
    [ValidateNotNullOrEmpty()]
    [System.Object[]]
    ${Property},

    [Parameter(ParameterSetName='Page', Position=4)]
    [ValidateNotNullOrEmpty()]
    [System.String[]]
    ${Body},

    [Parameter(ParameterSetName='Page', Position=2)]
    [ValidateNotNullOrEmpty()]
    [System.String[]]
    ${Head},

    [Parameter(ParameterSetName='Page', Position=3)]
    [ValidateNotNullOrEmpty()]
    [System.String]
    ${Title},

    [ValidateSet('Table','List')]
    [ValidateNotNullOrEmpty()]
    [System.String]
    ${As},

    [Parameter(ParameterSetName='Page')]
    [Alias('cu','uri')]
    [ValidateNotNullOrEmpty()]
    [System.Uri]
    ${CssUri},

    [Parameter(ParameterSetName='Fragment')]
    [ValidateNotNullOrEmpty()]
    [Switch]
    ${Fragment},

    [ValidateNotNullOrEmpty()]
    [System.String[]]
    ${PostContent},

    [ValidateNotNullOrEmpty()]
    [System.String[]]
    ${PreContent})

begin
{
    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer))
        {
            $PSBoundParameters['OutBuffer'] = 1
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('ConvertTo-Html',
            [System.Management.Automation.CommandTypes]::Cmdlet)

        # define string variable to become the target command line
        #region Initialize helper variable to create command
        $scriptCmdPipeline = ''
        #endregion

        # add new parameter handling
        #region Process and remove the Path parameter if it is present
        if ($Path) {
            $PSBoundParameters.Remove('Path') | Out-Null
            $scriptCmdPipeline += " | Out-File -FilePath $Path"
        }
        #endregion

        $scriptCmd = {& $wrappedCmd @PSBoundParameters}

        # redefine command invocation
        #region Append our pipeline command to the wrapped command script block
        $scriptCmd = $ExecutionContext.InvokeCommand.NewScriptBlock(
                [string]$scriptCmd + $scriptCmdPipeline
            )
        #endregion

        $steppablePipeline =
          $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process
{
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end
{
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
<#

.ForwardHelpTargetName ConvertTo-Html
.ForwardHelpCategory Cmdlet

#>}

Hope you find this useful and it gets you the feature you wanted without waiting for PowerShell v3. ;)

Tags: , , , , , , ,

Next Page »


View Dmitry Sotnikov's profile on LinkedIn

Follow Dmitry Sotnikov at Twitter

My Recent Tweets

Archives

See you at:

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 Quest Software or anyone else for that matter. All trademarks acknowledged.

© 2007 Dmitry Sotnikov

Pages

 

November 2009
M T W T F S S
« Oct    
 1
2345678
9101112131415
16171819202122
23242526272829
30