The other day I was playing around in WSL with a colleague of mine and we did this:
[Read More]Local User Management Polyfill
Older Versions of Windows 10 and all Windows Server 2012 systems have no local user management commandlets.
This is a working polyfill to allow scripts using local user management to run on old systems.
Linked: Powershell PSDefaultParameterValues
A deep dive into PowerShell parameter defaults
The Null-Coalescing Operator
A closer look at the null-coalescing operator and how it can help us in writing smarter, more concise scripts.
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]Delete Your Old VMware Snapshots
How To Find With PowerShell
Finding files, do I even need to describe how important this is?
Finding files, do I even need to describe how important this is?
[Read More]Super-Charged Cmdlet Aliases
It works like magic, but it works - Bring your aliasing to a whole other level!
Linked: Powershell Aliasing
A deep dive into aliasing with PowerShell
Why You Want To Install PowerShell On Windows
Why installing PowerShell on Windows may actually be a good idea
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
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!
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
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.
Bash Utilities In Powershell
Replacing common bash utilities in PowerShell
Vmware Tools Copy Files
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"
vCenter Cert Bundle
Errors connecting to vCenter or any ESXi server in the cluster without certificate errors?
- Get CA cert from the vCenter:
wget https://{{ YOUR VCENTER }}/certs/download.zip --no-check-certificate
- Install where required