Random Man Page in PowerShell

Random Man Page in PowerShell

PowerShell is a programming language and console application that comes with “batteries included”. The help system and documentation is built in. Granted, it arrives in an outdated form for built-in modules and requires an Update-Help to be complete. A man page is crucial for understanding commands in Linux. One of the ways I learn new technology is to read the man page. It isn’t the most efficient way to learn, I prefer a combination of books and video training, but…

Read More Read More

PSGitLab v3.0.1 Released

PSGitLab v3.0.1 Released

A ton of work went into the v3 version of PSGitLab, both on my part and that of the community. There are new contributors as well as familiar names in the changelog and I am thankful for all of the help. My goal of releasing an open source project to help others has been greatly exceeded by the contribution of those in the PowerShell community. Over the next few months, I hope to make it easier for new contributors to jump in and add coverage to the GitLab API.

Import a Module from Other Computers

Import a Module from Other Computers

PowerShell comes with a simple way to install a module using PowerShellGet and the Find/Install Module cmdlets. Did you know however that you can import modules, over the network, from a computer that already has them installed? They aren’t installed locally and when you run the commands, PowerShell will seemlessly run them in the PowerShell process running on the remote computer. I am constantly hopping onto different computers at work and not all of the computers have the RSAT tools…

Read More Read More

Git Commit Messages and Hooks

Git Commit Messages and Hooks

Maintaining integrity in your code is hard. Git hooks are an easy way to manage your workflow so you never commit code that doesn’t meet your standards. How do you know if the changes you made introduced bugs? Testing of course. Do you know if your code follows best practices? To figure that out, you’d use a linter. In PowerShell the community uses Pester for testing and PSScriptAnalyzer for making sure you follow community standards. Git hooks let you validate…

Read More Read More

Poor Man’s GUI

Poor Man’s GUI

If you’re like me, you try to automate everything through the PowerShell console. Automate employee account creation, easy. Check the registry on 500 remote servers, wouldn’t break a sweat. How about delegating your script to a junior systems administrator or maybe a help desk technician? That isn’t so easy. You have to trap errors, sanitize inputs, and generally guide the user through documentation. After all that, trust that you’re underling knows their way around the console. Maybe you need a…

Read More Read More

Using ThreadJob for Performance

Using ThreadJob for Performance

Parallelizing work in PowerShell has been a drag. Runspaces are too complicated to spin up and background jobs are too resource intensive. There is a parallel foreach parameter when using workflows but I’ve never been able to figure workflows out. I’ve always used Invoke-Parallel and PoshRSJob to accomplish most speed related tasks but now there is a new module in town. The PowerShell team has just released to the PowerShell Gallery a new module called ThreadJob to handle spinning up…

Read More Read More

Deploying PowerShell Down-level

Deploying PowerShell Down-level

There have been many great features added to PowerShell throughout the years.  Lots of new cmdlets come through the Remote Server Administration Tools (RSAT) or baked into the new version of the operating system. Some features we’re deemed so important that they were back-ported to older operating systems like Windows 7. Remember that Windows 7 came with Windows Management Framework (WMF) 2 so updates are definitely needed. The best PowerShell experience is still going to be using the latest Windows…

Read More Read More

PowerShell Core 6.0 Released

PowerShell Core 6.0 Released

PowerShell Core 6.0 has been released thanks to the hard work of the PowerShell Team. It is a stripped down version of PowerShell that runs cross-platform. That means PowerShell for Linux, MacOS, and even ARM based devices. All new development will go into PowerShell Core so it is time to jump on the bandwagon and get involved. If you run into issues make sure to report them. If you’re interested in proposing big changes check out the PowerShell-RFC to submit…

Read More Read More

Adding Updates to a Wim File

Adding Updates to a Wim File

Even with Microsoft releasing new Windows 10 builds on a twice-yearly basis, there is still a case to be made to slipstream updates into your install media. First, you never have to worry about whether your computer gets needed patches. If you build in protection against the Wanna Cry malware by patching MS17-010 you can. Second, it saves a decent amount of time during computer provisioning. No need to push down the original copy of a file as well as…

Read More Read More