This kind of request comes up all the time on StackOverflow and /r/PowerShell.
“How can I extract content from a webpage using PowerShell”.
And it’s an interesting problem to solve. However, nothing motivates like greed, and I recently revisited this topic in order to help me track down the newest must-have item, the Switch.
In fact, this post COULD have been called ‘Finding a Nintendo Switch with PowerShell’!
I have been REALLY wanting a Nintendo Switch, and since I’ll be flying up to NYC next month for Tome’s NYC TechStravaganza (come see me if you’ll be in Manhattan that day!), it’s the perfect justification for She-Who-Holds-The-Wallet for me to get one!
But EVERYWHERE is sold out. Still! 😦
However, the stores have been receiving inventory every now and then, and I know that when GameStop has it in stock, I want to buy it from them! With that in mind, I knew I just needed a way to monitor the page and alert me when some text on it changes.
This post is part of the series on AutoCompletion options for PowerShell! Click the banner for more posts in the series!
Previously in this series, we reviewed a few ways to add AutoComplete onto your functions, covering Param AutoCompletion and Dynamic Parameters. In this post, we’ll spend a LOT of time typing in the present to help our future selves save fractions of a second, because there’s no way we’ll become less lazy, right? At the end of the day, we will have achieved the holy grail of Attaboys, and have Output Autocomplete working in our function.
You know how in PowerShell you can type a cmdlet, then pipe into Select-Object or another cmdlet and start tabbing through property names? This is the type of Autocompletion we are going to add to our function in this post!
Not only does this save you from making mistakes, but it is amazingly convenient and really gives our functions a polished and professional look and feel. PowerShell’s ability to do this highlights one of its distinguishing features as well!
Dynamic Type System
Warning: this next part is probably kind of boring
If you’re like me, you read things and then just gloss over all of the words and symbols you don’t know, assuming they’re unimportant. If I just described you, then I hate to be the one to tell you this, but that is kind of a tremendous character flaw. I’ll get around to why this is bad and how it relates to PowerShell, but first, take us on a detour into my past. Continue reading →
Recently, I had a customer looking at setting up potentially tens of thousands of Point of Sale Kiosks running Windows 10 on an LTSB branch. We wanted users to have to input their password, but noticed that if a Windows 10 machine is in the docking station, the Touch Keyboard will never display!
Paradoxically, if the user has a Windows Hello Pin specified, that version of the touch keyboard will appear. But for a regular password? Nope, no On-Screen Keyboard. And using the dated compatibility keyboard (OSK.exe) was not an option.
To illustrate how weird this confluence of conditions was, I’ve provided a video
On screen keyboard won't display on 2016 LTSB when docked, with no physical keyboard. Anyone have a pointer? pic.twitter.com/rOKC9AnCNM
Windows 10 built on the awesome features of Windows 8, and brought over the very powerful ‘Refresh My PC’ and ‘Reset My PC’ options. Truly awesome, they’re able to refresh the base OS and forklift over your files, giving you that ‘just installed’ smell we all love so much.
I love that smell so much in fact, that I buy a new car every few weeks, or sometimes sleep in cars at the CarMax down the road from my house. Mmmmm plastic and leather offgas.
However, sometimes things go awry, and from no fault of our own, we can end up with a system which will refuse to either reset or refresh. Read on to see how to fix this problem. Continue reading →
One of the things I absolutely love about my job is being thrown into the deep end of the rapids with little to no time to prepare given the opportunity to try new things and new technologies, pushing me out of my comfort zone. It normally goes okay.
Case in point: a client of ours recently was investigating WinRM and whether or not it was secure, leading me down a rabbit hole of Certificates, Enterprise CA’s, SSL Handshakes, WireShark and more.
At the end of the initiative, I was asked to write up a summary to answer the question
In this post, I’ll talk us through my findings after days of research and testing, stepping through the default settings and some edge cases, hopefully covering the minimum you need to know in a short little post.
Consider the following scenario: two computers, both members of the same domain. We run winrm quickconfig on both computers and don’t take any additional steps to lock things down. Is it secure? Are credentials or results passed in the clear? Until stated otherwise, assume HTTP until I mention it again.
From the very first communications and with no additional configuration, connections between the two computers will use Kerberos for initial authentication. If you’re not familiar with it, the bare minimum to know is that Kerberos is a trusted mechanism which ensures that credentials are strongly protected, and has a lot of nifty features like hashing and tickets which are used to ensure that raw credentials never go over the wire. So, domain joined computers do not pass creds in the clear. Continue reading →