Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 1.16 KB

readme.md

File metadata and controls

24 lines (21 loc) · 1.16 KB

NASA Astronomy Photo of the Day via PowerShell

Set NASA's Astronomy Photo of the Day as your desktop background using PowerShell

Note:

Chose location where to place the script

  1. Create a folder where to place the script, eg: C:\User\Peter\APOD\
  2. Place the powershell script into newly created folder^^
  3. Edit the script file on line 8 and 11 to replace with the correct path to script file location; Replace "<UserAccount>" with your real account name.

Before being able to run this script without using ISE, you will need to set the execution policy.

  1. Run PowerShell ISE as Administrator
  2. Run the following command to unblock the script:
    • Unblock-File -Path c:\Path\to\script.ps1
  3. Run the following command to allow the script to run:
    • Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine

You can set this to run each time you login to the machine, for exmample every morning.

  1. Open Task Scheduler
  2. Create a new local task
  3. Give it a name and description; APOD Wallpaper, for example.
  4. Set a trigger as desired, When I log in for example.
  5. Start a program:
    • powershell.exe C:\path\to\script.ps1
  6. Test it out.