PowerWF News, Tutorials, and more...

Get the latest tips and tricks directly from the PowerWF development team. Find out about new releases and upcoming features.


Seamless Automation

From the Desktop to the Data Center

The PowerWF family of products are easy enough for desktop and departmental automation, yet powerful and scalable enough for the Data Center. PowerWF compliments Opalis and other RBA solutions, lets you leverage your workforce and preserves your investment as your automation needs grow.


Special - 20% Discount


In conjunction with our recently announced Silver Award from Windows IT Magazine we would like to offer our customers an opportunity to save 20% off any Devfarm product purchase through the end of the year. This includes all PowerWF products as well as Devfarm's new PowerVI product!

PowerVI

vSphere Automation fueled by PowerShell


Designed for the VMware Administrator, PowerVI eases the automation of vSphere infrastructures. PowerVI includes over 100 PowerShell automation scripts that simplify everyday VMware administration tasks and PowerVI makes it easy to author new scripts.
January 27, 2012

PowerShell Scheduling

Jeffery Hicks is working on a PowerShell scheduler that looks pretty promising.

Today’s Friday Fun is a continuation of my exploration of ways to use Start-Job. A few weeks ago I wrote about using Start-Job to create “scheduled” tasks. I realized I could take this further and turn this into a sort of alarm clock. The goal is to execute at command at a given time, but I wanted to make it easy to specify the time. What I have so far is a function called New-Alarm. I have some other ideas and hope to expand this into a module, but for now I thought I’d toss this out to you and get some feedback.

(read more)

By the way, if you are using PowerWF, it includes an agent that makes it easy to schedule your PowerShell scripts or workflows to run an a specific schedule (Every so many minutes, every Wednesday, etc.)



January 25, 2012

PowerShell Function Primer

Richard Siddaway at IT Knowledge Exchange answers a very basic question that many new PowerShell scripters run into - Once I create a function, how do I use it.

Most of my scripts end up being functions because I will eventually combine them into modules

My recent script

function get-logedonuser {
param (
 [string]$computername = $env:COMPUTERNAME
)
Get-WmiObject -Class Win32_LogonSession -ComputerName $computername |
foreach {
 $data = $_                        

 $id = $data.__RELPATH -replace """", "'"
 $q = "ASSOCIATORS OF {$id} WHERE ResultClass = Win32_Account"
 Get-WmiObject -ComputerName $computername -Query $q |
 select @{N="User";E={$($_.Caption)}},
 @{N="LogonTime";E={$data.ConvertToDateTime($data.StartTime)}}
}
}

Prompted a comment about how could you run this script.

First off I would save it to a file – get-logedonuser.ps1

You can then either

(read more)

If you are running PowerWF, it is very easy to leverage a function you find on the internet.  Simply paste the function into a script block in the workflow and then either call it from that script block or from elsewhere in your workflow.



January 23, 2012

VMware Cluster Capacity Check

Jonathan Medd has posted another useful PowerShell/PowerCLI script.  This time he is looking at Cluster storage capacity.

I recently needed to provide a high level capacity overview per VMware cluster looking at some metrics of interest that were being used as a guide to the capacity state of a cluster. Note: these are by no means definitive or the ones you should be using in your environment, but for these purposes they met the requirements. The metrics I looked at per cluster were the ratio of vCPUs to pCPUs, the amount of Effective, Allocated and average Active Memory and the amount of Free Diskspace.

(read more and download script)

As is usually the case, it would be very straight forward to convert this script to a PowerWF workflow or a PowerVI script so that you can run it from your vSphere client.



December 30, 2011

Count Running Virtual Machines on Datastores

Found another good candidate for a PowerVI script at vNiklas.djungel.se.

If you are running too many VM´s on your datastores in your vSphere environment you can have some problems, this if your SAN is not VAAI compliant and can handle SCSI locking etc.

Alan Renouf has made a blog post about how to get a report about how many VM´s you have on every datastore, I have extended to only report on running VM´s as these are the interesting number..

(read more)

I would alter his script slightly for use in PowerVI.

#--name Virtual Machines Per Datastore
#--multi --hideoutput
#--origin PowerSE

Get-Datastore | 
	Select Name,@{Name="TotalVMs";Expression={@($_ | 
	Get-VM).Count}}, 
	@{Name="PoweredOnVMs";Expression={@($_ | Get-VM | where {$_.PowerState -eq "PoweredOn"}).Count}}, 
	@{Name="PoweredOffVMs";Expression={@($_ | Get-VM | where {$_.PowerState -eq "PoweredOff"}).Count}}, 
	@{Name="SuspendedVMs";Expression={@($_ | Get-VM | where {$_.PowerState -eq "Suspended"}).Count}} | 
	Sort Name | 
	out-GridView


December 29, 2011

PowerShell v3 and Workflow

The Microsoft PowerShell development team is starting to talk about the addition of Workflow to PowerShell v3.  As Hal points out -

A workflow is a sequence of automated steps or activities that execute tasks on or retrieve data from one or more managed nodes (computers or devices). These activities can include individual commands or scripts. Windows PowerShell Workflow enables, IT pros and developers alike, to author sequences of multi-computer management activities — that are either long-running, repeatable, frequent, parallelizable, interruptible, stoppable, or restartable — as workflows. By design, workflows can be resumed from an intentional or accidental suspension or interruption, such as a network outage, a reboot or power loss.

(read more)

PowerWF has been providing a workflow orchestration layer to PowerShell for 3 years now.



December 24, 2011

Alan Renouf’s Top 5 PowerCLI Scripts

Alan Renouf has posted his top PowerCLI scripts of the week (a couple are from PowerWF friend Luc Dekens).  There are scripts on High Availability, Storage DRS, getting VMware Views, and virtual machine start up scripts.



December 23, 2011

Windows Azure Node PowerShell Primer

WindowsAzure.com has a nice primer on using PowerShell with Windows Azure Node.js.

What Is Windows Azure PowerShell for Node.js

Windows Azure PowerShell for Node.js provides a command-line environment for developing and deploying Node applications for Windows Azure through a few Windows PowerShell cmdlets.

The following tasks are supported:

  • Import publishing settings to enable you to deploy services in Windows Azure.
  • Generate configuration files and a sample application for a Node hosted service. Create a Windows Azure service that contains web roles and worker roles.
  • Test your service locally using the Windows Azure compute emulator.
  • Deploy your service to the Windows Azure staging or production environment.
  • Scale and update services in Windows Azure.
  • Enable and disable remote access to service role instances.
  • Start, stop, and remove services.

If you are using Azure, this is worth a read.



December 22, 2011

Custom PowerShell Module Installation - Best Practices

If you are authoring your own PowerShell modules using PowerSE or PowerWF, you should check out this post on Module Installation Best Practices by PowerShell MVP Oisin Grehan.

I’m seeing a few errant companies have their installers throw their modules into ${env:systemroot}\WindowsPowerShell\1.0\Modules but this is not the right place. The only things that should go there are core operating system modules from Microsoft. So, where should you install them?

(read more)



December 21, 2011

Don Jones Quote

From PowerShell MVP Don Jones

Remember my PowerShell Proverb: Every time you write a script that outputs text, God kills a puppy. It’s on your head.

WOW! At least he tells you how to avoid this fate.



December 20, 2011

Exchange 2010 Room List Report from PowerShell

Mike Pfeiffer has a nice write up on querying a list of conference rooms in Exchange 2010 using PowerShell.

If you work in an campus type of environment, where you have conference rooms spread out across multiple buildings or physical sites, you may have heard of the Room Finder functionality introduced with Exchange 2010 and Outlook 2010. The Room Finder allows users to easily locate a room resource when scheduling a meeting in Outlook. Instead of users having to scroll through the Global Address List (GAL) or try to guess which room resources are located in a particular location, they can select the appropriate room list, and see all of the available rooms.

Room lists are essentially just a special type of Distribution Group in Exchange. To populate the room list, you simply add one or more resource mailboxes to the group. After you’ve defined several room lists, you’ll probably get to the point where you need to generate a report listing all of the room lists and their associated resource mailboxes. The key to generating a report is to simply query the members of each distribution group that are designated as a room list.

(read more and view code)



 ::: Newer Posts  ::: Older Posts :::