Whenever I’m exploring a new PowerShell module or snapin, one of the first things I do is list all of the commands found within the module. PS C:\scripts> get-command -module psworkflow CommandType Name ModuleName ———– —- ———- Function New-PSWorkflowSession PSWorkflow Cmdlet New-PSWorkflowExecutionOption PSWorkflow You can specify either a module or a snapin. Use the -module…
Tag: PowerShell
MSDevWNY PowerShell Advanced Functions
Last night I presented for the MSDevWNY user group in the Buffalo, NY area. They were an interested and enthusiastic audience and I think we could have spent another few hours talking about PowerShell. My presentation was one I’ve given before on Advanced PowerShell functions. I promised the group a copy of my slides and…
Adding System Path to CIMInstance Objects
The other night when I presented for the Mississippi PowerShell Users’ Group, one of the members showed some PowerShell 3.0 code using the CIM cmdlets. At issue is how the CIM cmdlets handle the WMI system properties like __SERVER and __RELPATH. By default, those properties aren’t displayed, but they are captured in the CimSystemProperties property….
Turning CLI Tools into PowerShell Tools
Last night I gave a presentation for the Mississippi PowerShell User Group. My talk was based on the chapter I contributed to the forthcoming PowerShell Deep Dives book. In the chapter I explore different techniques for turning command line tools into PowerShell tools. My presentation demonstrated those techniques in action. As promised, I’ve bundled my…
Friday Fun: It’s PowerShell, Baby!
The other day I received an email looking for guidance on using Invoke-Webrequest to pull data from a table on a web page. Specifically, he wanted to get the list of popular baby names from http://www.ssa.gov/OACT/babynames/index.html. I gave him some quick tips but figured this would also be another teaching opportunity. Using Invoke-Webrequest with PowerShell…
Friday Fun: View Objects in a PowerShell GridList
One of the things that makes PowerShell easy to learn is discoverability. Want to know more about a particular type of object? Pipe it to Get-Member. Or if you want to see values pipe it to Select-Object. get-ciminstance win32_computersystem | select * That’s not too bad. Or you can pipe to Out-Gridview. Get-CimInstance win32_computersystem |…
Friday Fun: A PowerShell Tickler
I spend a lot of my day in the PowerShell console. As you might imagine, I often have a lot going on and sometimes it is a challenge to keep on top of everything. So I thought I could use PowerShell to help out. I created a PowerShell tickler system. Way back in the day…
Test 64-Bit Operating System
One of the great features of PowerShell is how much you can get from a relatively simple one line command. For example. you might want to test if a computer is running a 64-bit operating system. You can find out with a command as simple as this. PS C:\> (get-wmiobject win32_operatingsystem -comp chi-dc01).OsArchitecture -match “64”…
PowerShell Version Profiles
One of the best things about PowerShell 3.0, for me anyway, is the ability to run PowerShell 2.0 side by side. I often need to test commands and scripts in both versions not only for my writing projects but also when helping people out. Like many of you I have a PowerShell profile script that…
Scrub Up PowerShell Content
It is probably a safe bet to say that IT Pros store a lot of information in simple text files. There’s nothing with this. Notepad is ubiquitous and text files obviously easy to use. I bet you have text files of computer names, user names, service names, directories and probably a few that are unique…
PowerShell Scripting Games 2013 Impressions
Now that the PowerShell Scripting Games for 2013 are well underway, I thought I’d share my thoughts and impressions on what I’ve seen. I’m very impressed with the number of entries and generally the quality is pretty good. But as a judge I see repeated items that bear comment. These comments are in no particular…
Getting Top Level Folder Report in PowerShell
One of the sessions I presented recently at TechDays San Francisco was on file share management with PowerShell. One of the scripts I demonstrated was for a function to get information for top level folders. This is the type of thing that could be handy to run say against the root of your shared users…
Why Doesn’t My Pipeline Work?
I saw a little discussion thread on Twitter this morning which I felt needed a little more room to explain. Plus since we’re in ScriptingGames season beginners might like a few pointers. I always talk about PowerShell, objects and the pipeline. But sometimes what looks like a pipelined expression in the PowerShell ISE doesn’t behave…
TechDays SF Presentations
Last week I presented a number of sessions at TechDays in beautiful San Francisco. Met some great people and had a great time. I presented 4 talks, almost all of them PowerShell-related. Actually, they all had some type of PowerShell content. I’m happy to share my session slides and PowerShell demonstrations. Most of the demonstrations…