New WebHost
PowerShell Station - Mike's PowerShell Musings
by mike
2y ago
After an emergency at my previous webhost, I’ve switched to a new webhost. If you see any missing content, let me know! The post New WebHost appeared first on PowerShell Station ..read more
Visit website
New WebHost
PowerShell Station - Mike's PowerShell Musings
by mike
3y ago
After an emergency at my previous webhost, I’ve switched to a new webhost. If you see any missing content, let me know! The post New WebHost appeared first on PowerShell Station ..read more
Visit website
Dude, Where’s my Command?
PowerShell Station - Mike's PowerShell Musings
by mike
3y ago
The Dilemma This post was inspired by a recent occurrence at work.  I have built a framework which constructs documents based on a lists of functions in a module specific to that kind of document. I found myself running into an issue where even though I knew there was a command named a certain thing, and that the function was correctly exported from the module, PowerShell wasn’t finding the command. My code looked something like this: $module='Module1' $Steps='Get-CustomerData','Get-MarketingData','New-CustomerMarketingDocument' # each function takes a hashtable as a parameter and output ..read more
Visit website
Git – The 5 Percent that I Always Use
PowerShell Station - Mike's PowerShell Musings
by mike
3y ago
One of the reasons I got into IT was that I really enjoy learning new things. Unfortunately, there are so many things to learn that it’s easy to get overwhelmed. Does it make sense to do a deep-dive into each technology that you use, or does it sometimes make sense to skim the cream off the top and move on to the next technology? In this post, I’m talking about git, the distributed source control system that is used in GitHub, Azure DevOps Repos, GitLab, and countless other places.  Git can be really complicated, and intimidating, so I’m going to try to convey the tiny fragment of git whi ..read more
Visit website
Very Verbose PowerShell Output
PowerShell Station - Mike's PowerShell Musings
by mike
3y ago
Have you ever been writing a PowerShell script and wanted verbose output to show up no matter what? You may have thought of doing something like this: #Save the preference variable so you can put it back later $saveVerbosePreference=$VerbosePreference #Override the preference variable to make the output show up $VerbosePreference='Continue' Write-Verbose 'This is an important message you need to see' #Leave it like you found it $VerbosePreference=$saveVerbosePreference If you do that, you’ll get the verbose message every time, just like you wanted. Fortunately for you, there’s a much easie ..read more
Visit website
A PowerShell Parameter Puzzler
PowerShell Station - Mike's PowerShell Musings
by mike
3y ago
I ran across an interesting PowerShell behavior today thanks to a coworker (hi Matt!). It involved a function with just a few arguments. When I looked at the syntax something looked off. I am not going to recreate the exact scenario I found (because it involved a cmdlet written in C#), but I was able to recreate a similar issue using advanced functions. So consider that you are entering a command and you see an intellisense prompt like this one: You would rightfully assume that it had 3 parameters. If you looked at the syntax using Get-Help (or the -? switch) you would see something strange ..read more
Visit website
The PowerShell Conference Book
PowerShell Station - Mike's PowerShell Musings
by mike
3y ago
Back in May, Mike Robbins (@mikefrobbins) asked if I wanted to contribute a chapter to a book he was putting together. The book would include chapters from different scripters in the PowerShell community and each would provide material that would be similar to a session at a conference. In addition, the proceeds from the sale of the book would support the DevOpsCollective OnRamp scholarship for new IT pros going to the PowerShell and DevOps Conference in 2019. Sounded like fun, so I signed on. We did the writing in markdown in a private GitHub repo. Not at all what I’m used to for writing but ..read more
Visit website
PowerShell DSL Module Considerations
PowerShell Station - Mike's PowerShell Musings
by mike
3y ago
Just a quick note to mention a couple of things I’ve come across with PowerShell modules that encapsulate DSLs (Domain Specific Languages, specifically WPFBot3000). PowerShell Command Name Warnings PowerShell modules have always issued warnings if they contain commands that don’t use approved verbs.  What’s fun with modules for DSLs is that the commands in general don’t use verbs at all.  Since these commands aren’t “proper”, you might expect a warning.  You won’t get one, though. PowerShell Module Autoloading PowerShell modules have had autoloading since v3.0.  Simply put ..read more
Visit website
WPFBot3000 – Approaching 1.0
PowerShell Station - Mike's PowerShell Musings
by mike
3y ago
I just pushed version 0.9.18 of WPFBot3000 to the PowerShell Gallery and would love to get feedback. I’ve been poking and prodding, refactoring and shuffling for the last month or so. In that time I’ve added the following: Attached Properties (like Grid.Row or Dockpanel.Top) DockPanels A separate “DataEntryGrid” to help with complex layout A ton of other controls (DataGrid and ListView are examples) A really exciting BYOC (bring your own controls) set of functions Mostly, though, I’ve tried to focus on one thing: reducing the code needed to build a UI. To that end, here are a few more additi ..read more
Visit website
Introducing WPFBot3000
PowerShell Station - Mike's PowerShell Musings
by mike
3y ago
Preamble After 2 “intro” posts about writing a DSL for WPF, I decided to just bit the bullet and publish the project. It has been bubbling around in my head (and in github) for over 6 months and rather than give it out in installments I decided that I would rather just have it in front of a bunch of people. You can find WPFBot3000 here. Before the code, a few remarks A few things I need to say before I get to showing example code. First, naming is hard. The repo for this has been called “WPF_DSL” until about 2 hours ago. I decided on the way home from work that it needed a better name. Since ..read more
Visit website

Follow PowerShell Station - Mike's PowerShell Musings on FeedSpot

Continue with Google
Continue with Apple
OR