Download Full Website Copy
Posted on 2021-04-01
Sometimes it’s nice to download a best effort version of a website,
for example before completely redesigning it.
domain=WEB.SITE
wget $domain --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains $domain
Linked: Powershell PSDefaultParameterValues
A deep dive into PowerShell parameter defaults
Posted on 2021-03-27
(Last modified on 2024-11-02)
I published a post about how to work with parameter defaults in PowerShell over on the ScriptRunner blog.
Read now: English
or Deutsch
The Null-Coalescing Operator
A closer look at the null-coalescing operator and how it can help us in writing smarter, more concise scripts.
Posted on 2021-03-22
(Last modified on 2024-11-02)
Today we take a closer look at the null-coalescing operator and how it can help us in writing smarter, more concise scripts.
[Read More]
Renovate Bot
Posted on 2021-02-12
(Last modified on 2024-06-10)
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
Posted on 2021-01-04
(Last modified on 2024-11-02)
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
Posted on 2021-01-01
(Last modified on 2024-11-02)
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]
How To Find With PowerShell
Finding files, do I even need to describe how important this is?
Posted on 2020-12-31
(Last modified on 2024-11-02)
Finding files, do I even need to describe how important this is?
[Read More]
Looking back at 2020, Four Months Of Blogging
A look back on four months of blogging and engaging the PowerShell community
Posted on 2020-12-22
(Last modified on 2024-11-02)
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
Posted on 2020-12-17
(Last modified on 2024-11-02)
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!
Posted on 2020-12-02
(Last modified on 2024-11-02)
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]
Linked: Powershell Aliasing
A deep dive into aliasing with PowerShell
Posted on 2020-12-02
(Last modified on 2024-11-02)
I published a post about aliasing with PowerShell over on the ScriptRunner blog.
Read now: English or Deutsch
Why You Want To Install PowerShell On Windows
Why installing PowerShell on Windows may actually be a good idea
Posted on 2020-11-28
(Last modified on 2024-11-02)
Q: Wait a minute! Don’t I already have PowerShell?
A: Yes. However you may want to continue reading because things are never as simple as they appear.
[Read More]
Collections and Randomization
Randomize Collections in PowerShell
Posted on 2020-11-18
(Last modified on 2024-11-02)
Randomizing a collection is useful in a variety of situations and in most languages it is fairly straight forward.
[Read More]
How To Grep With PowerShell
It's just like Bash, but more powerful!
Posted on 2020-09-30
(Last modified on 2024-11-02)
Filtering data, from log or config files to data returned by an api,
is an important operation to remove noise from it and make further analysis possible.
[Read More]
How To Tail With PowerShell
How to replace tail in PowerShell
Posted on 2020-09-21
(Last modified on 2024-11-02)
Printing the last or first, few lines of a file is a common operation in day to day operations.
On Linux most people will, without thinking twice, use tail
and it’s counterpart head
to achieve this.
[Read More]
Bash Utilities In Powershell
Replacing common bash utilities in PowerShell
Posted on 2020-09-20
(Last modified on 2024-11-02)
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
Posted on 2020-09-17
(Last modified on 2022-07-01)
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"
Hello World
Who am I and what to expect on this blog
Posted on 2020-09-13
(Last modified on 2024-11-02)
Ansible VMware Connection Plugin & Become
Posted on 2020-07-02
(Last modified on 2021-08-09)
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]
IANA To openSSL Ciphers
Posted on 2020-03-07
Handy table to map IANA IDs of ciphers to their openSSL IDs used in web server configurations,
for example [[nginx]] ssl_ciphers
or proxy_ssl_ciphers
https://testssl.sh/openssl-iana.mapping.html