On Linux/Unix/MacOS:
find . | grep " "
On Windows:
Get-ChildItem -Path "." -Recurse -Filter "* *" | Format-Table FullName
On Linux/Unix/MacOS:
find . | grep " "
On Windows:
Get-ChildItem -Path "." -Recurse -Filter "* *" | Format-Table FullName
The other day I was playing around in WSL with a colleague of mine and we did this:
[Read More]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.
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]Finding files, do I even need to describe how important this is?
[Read More]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]Randomizing a collection is useful in a variety of situations and in most languages it is fairly straight forward.
[Read More]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]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.
$vm = Get-VM -Name TEST
Get-Item "X:\yourfile.txt" | Copy-VMGuestFile -Destination "c:\temp" -VM $vm -LocalToGuest -GuestUser "Administrator" -GuestPassword "Pa$$w0rd"
$vm = Get-VM -Name TEST
Copy-VMGuestFile -Source c:\yourfile.txt -Destination c:\temp\ -VM $vm -GuestToLocal -GuestUser "Administrator" -GuestPassword "Pa$$w0rd"
PowerShell holds a special place in my heart as it was the first ever tool I dived into deeply and used to automate my daily work.
To this day it runs a bunch of fundamental automations in my life.
Errors connecting to vCenter or any ESXi server in the cluster without certificate errors?
wget https://{{ YOUR VCENTER }}/certs/download.zip --no-check-certificate