Renovate Bot

My tool of choice for doing dependency maintenance/update type of stuff for both [[infrastructure-as-code]] and [[software-projects]]

GumLab

My first ever product

As part of my goal to write a book I began looking at how to build a following and where to sell the book once it’s finished. On this journey I found Gumroad, a great place to sell digital products. Given my idea to sell a comprehensive library of code snippets besides the actual book I took a look at existing integrations between it and GitLab.com, my preferred git host. [Read More]

Delete Your Old VMware Snapshots

For the love of Pete, please delete your old snapshots regularly! Old snapshots have caused incidents and even outages more than once in my career and it is really easy to preemptively look for them and get them removed before anything happens. Why To put it plainly, they can cause issues - like 03:00 in the morning pager alert issues and additionally eat up storage space like crazy. Degraded performance of the VM having the snapshot Degraded performance to full outages for other VMs on the same data store due to rapidly increasing snapshot sizes VMware recommends a series of steps to reduce risk when using snapshots: [Read More]

Looking back at 2020, Four Months Of Blogging

A look back on four months of blogging and engaging the PowerShell community

The year is coming to an end, with all its ups and downs 2020 surely was challenging to say the least. I wanted to take this time to openly reflect on my first couple months of blogging and what the future holds for ps1.guru PS> $firstPost = Get-Date -Year 2020 -Month 09 -Day 13 PS> $latestPost = Get-Date -Year 2020 -Month 12 -Day 22 PS> New-TimeSpan $firstPost $latestPost | Select-Object Days Days ---- 100 So, how are things going? [Read More]

My Stand On Affiliate Links

What I think about affiliate links

Lets talk about affiliate links for a moment. TLDR: I will use affiliate links where it is possible for me, which isn’t often to be honest. Lets dig into it, starting with some basic assumptions I am making: Most of my posts are technical content where I do not recommend any products or services, so there are no opportunities for affiliate links to begin with In posts where I reference a product or service I do so because I think it is great and I really want to recommend it There are no negative effects for the reader when using my affiliate links There are benefits for me when you use the affiliate link, either monetary or in credit with the service - This helps me keep this blog up and running for everyone to benefit Given those assumptions I don’t see any reason why I should not use affiliate links. [Read More]

Super-Charged Cmdlet Aliases

It works like magic, but it works - Bring your aliasing to a whole other level!

Backstory I recently wrote a post about PowerShell Aliasing for the folks over at ScriptRunner. The one issue I had while researching for this post was this: You can not create a alias for a function and overwrite one of it’s parameters at the same time while keeping nice features like tab-complete. For a concrete example of this visit please look at the original post. At the end of the post I asked if anyone had a solution to this problem - and the internet delivered! [Read More]

Bash Utilities In Powershell

Replacing common bash utilities in PowerShell

Whats the first thing coming to mind when seeing a command line? For most people it is Linux, be it Ubuntu, Debian or RedHat. And it is completely understandable. A big part of our industry has a background in Linux and sees it as the superior system for quick scripts and the like. In this series I want to challenge this notion. PowerShell can compete with, an in some cases outperform, the quick scripts and common daily tasks done in Linux shells. [Read More]

Vmware Tools Copy Files

Docs

Copy To Guest

$vm = Get-VM -Name TEST
Get-Item "X:\yourfile.txt" | Copy-VMGuestFile -Destination "c:\temp" -VM $vm -LocalToGuest -GuestUser "Administrator" -GuestPassword "Pa$$w0rd"

Copy From Guest

$vm = Get-VM -Name TEST
Copy-VMGuestFile -Source c:\yourfile.txt -Destination c:\temp\ -VM $vm -GuestToLocal -GuestUser "Administrator" -GuestPassword "Pa$$w0rd"

Ansible VMware Connection Plugin & Become

When using VMware as the connection plugin to connect to remote hosts you commonly set two facts for username and password: ansible_vmware_tools_user: "mkamner" ansible_vmare_tools_password: "Super Secret PW" This will work just fine for windows and with many tasks on linux. However, if you want to use become: true on linux it will fail with the strangest error messages. For example: apt will fail, because it can’t acquire the lock file [Read More]