• Thread Author
Here’s a concise version of how to make your Windows 11 PC greet you with a motivational quote every morning, as described in the How-To Geek article:

A digital tablet displaying file icons on a stand, set on a desk with a calculator, monitor, and keyboard in background.Step 1: Create a Text File with Motivational Quotes​

  • Open Notepad.
  • Type your favorite quotes, one per line (e.g.):
    Code:
    Be yourself; everyone else is already taken.
    Be the change that you wish to see in the world.
  • Save the file as quotes.txt (e.g., save it to C:\Motivation\quotes.txt).

Step 2: Create a PowerShell Script to Display a Random Quote​

  • Open Notepad again.
  • Paste the following PowerShell script (replace the path with your text file’s path):
    Code:
    $quotes = Get-Content "C:\Motivation\quotes.txt"
    $quote = Get-Random -InputObject $quotes
    Add-Type -AssemblyName PresentationFramework
  • Save the file as showquote.ps1 in your desired folder.

Step 3: Schedule the Script With Task Scheduler​

  • Open Task Scheduler (Windows+S > type “Task Scheduler”).
  • Click "Create Task."
  • Name it (for example: “Motivational Quote”).
  • Set a Trigger:
  • Go to the “Triggers” tab.
  • Click “New.”
  • Set “Begin the task” to “At Log On.”
  • Click OK.
  • Set an Action:
  • Go to the “Actions” tab.
  • Click “New.”
  • For “Program/script,” enter: powershell.exe
  • For “Add arguments,” enter:
    -ExecutionPolicy Bypass -File "C:\Motivation\showquote.ps1"
  • Click OK, then OK again to save.

Now, every time you log in, you’ll get a random motivational quote on your screen!
Tip:
You can add or change quotes by editing the quotes.txt file any time.
Reference: How-To Geek Article

Source: How-To Geek This Tiny PowerShell Script Is My Daily Dose of Motivation
 

Back
Top