This PowerShell script sets the given image file as desktop wallpaper (.JPG or .PNG supported)
set-wallpaper.ps1 [[-ImageFile] <String>] [[-Style] <String>] [<CommonParameters>]
-ImageFile <String>
Specifies the path to the image file
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Style <String>
Specifies either Fill, Fit, Stretch, Tile, Center, or Span (default)
Required? false
Position? 2
Default value Span
Accept pipeline input? false
Accept wildcard characters? false
[<CommonParameters>]
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
PS> ./set-wallpaper C:\ocean.jpg
Author: Markus Fleschutz / License: CC0
https://github.com/fleschutz/PowerShell
Generated by convert-ps2md.ps1 using the comment-based help of set-wallpaper.ps1