I sometimes use PowerShell to create files or logs that include the date or time. My preference is to write dates and times from greatest to smallest value. I also prefer to use the hyphen as a delimiter because it is filename friendly. Here are the three most frequently used Get-Date -Format specifiers that I …
Category Archives: Software
User PowerShell to get all links on a website
Today I learned about Invoke-WebRequest and Get-Unique. Combine them together and you can quickly get all of the unique URLs linked on a website. Here’s a quick example using my jasonpearce.com website. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 …
Continue reading “User PowerShell to get all links on a website”
Scam/Hoax: Computer System Alert! System has been infected due to an unexpected error!
This evening I mistyped a URL and was redirected to https://virus–alert–warning.com/warning_error.dill (I changed the link to go to a security article). This URL, its error message, and its phone number is a scam. No harm has occurred to your computer and you should not call the number. Simply force your browser to close via Task …
Use PowerShell to require users with the oldest passwords to change their passwords
This PowerShell script will help you find the Active Directory users who have gone the longest without changing their password, and then require them to change their password the next time they logon to a domain resource. Consider this a password policy on a bell curve that targets those users who have the oldest Password …
Load PowerCLI into the PowerShell session as a module
Last year, VMware wrote about “PowerCLI 6.0 – Introducing PowerCLI Modules.” Although I’ve been using PowerCLI 6.0 since then, I missed the note from Alan Renouf that made it easy to load all of the PowerCLI functionality into a PowerShell session as a module instead of having to launch PowerCLI. Here was his tip/trick: 1 …
Continue reading “Load PowerCLI into the PowerShell session as a module”