to be short and sweet I am trying to create a Powershell script that changes the background lock screen image in Windows 10. Have done my research and here is what I found:
Nov 25, 2015 In Windows 10, you’ll encounter the sign-in window if you’ve recently booted your computer or have been away from the machine for awhile.
This is something simple that would accomplish my goal HOWEVER it points to the registry and my opinion is changing the registry is not the way to do it. Upon more research, I found another file path:
No access to this path.
What is a simple way USING Powershell to change the lock screen on Windows 10 without messing with the registry?
MarkFroMarkFro
1 Answer
With Powershell, the easiest way is to amend the registry entry, but there are a few other options available.
Let's start with the dreaded registry entry:
Just change the above
$value
variable to the path of the image you want to use as the desktop background.You can also change the 'theme' for the desktop using the below CMD line (can also be run in Powershell):
rundll32.exe %SystemRoot%system32shell32.dll,Control_RunDLL %SystemRoot%system32desk.cpl desk,@Themes /Action:OpenTheme /file:'YOUPATH to the .theme''
Just point it to the right path for the custom theme you want to set.
Last option was an EXE I found, but can't really confirm the validity of it so I won't link it (also doesn't fit the Powershell criteria!).
Note: I know you said to NOT edit the registry, but this really is the easiest way to go. If you find yourself doing this too much, add the registry entry and even the image file into your build image, though that might be overkill.
Ross LyonsRoss Lyons
Not the answer you're looking for? Browse other questions tagged powershellwindows-10 or ask your own question.
Problem with Remove-AppxProvisionedPackage on a fresh install of Windows 10 Enterprise build 1803If I run the following command:-
Remove-AppxProvisionedPackage -online -packagename Microsoft.BingWeather_4.22.3254.0_neutral_~_8wekyb3d8bbwe
I get the following error:-
Remove-AppxProvisionedPackage : Unspecified error
At line:1 char:1
+ Remove-AppxProvisionedPackage -online -packagename Microsoft.BingWe ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Remove-AppxProvisionedPackage], COMException
+ FullyQualifiedErrorId : Microsoft.Dism.Commands.RemoveAppxProvisionedPackageCommand
Package name not relevant as does it with any package I choose
Package is definitely installed as when I run Get-AppxProvisionedPackage -online | select displayname,packagename it shows in list
Any thoughts please