UPDATE –  5 Kasım 2018’de paylaşılan aşağıdaki script Windows 10 Pro 1803 ve 1809’da çalışmaktadır.

https://gallery.technet.microsoft.com/scriptcenter/Change-Lock-Screen-and-245b63a0/view/Discussions#content

Windows 10 lock screen resmini her bir bilgisayar için standart haline getirebilir ve group policy ile uzaktan uygulayabilirsiniz. Yalnız bu ayar sadece Windows 10 Enterprise, Education ve Server SKU için olup, Pro’da çalışmamaktadır.

Bu durumu aşabilmek için aşağıdaki linkde paylaşılan script’i kullanabilirsiniz. Logon script’e batch olarak ekleyerek, yüklenmesi istediğiniz imajın path’ini vermeniz yeterli.

https://social.technet.microsoft.com/Forums/en-US/20f8fdf0-cfb4-45bc-bb35-3c002efe60b1/registry-key-to-change-default-lock-screen-background-image-in-windows-10?forum=win10itprogeneral

Linkden farklı olarak Reg key’ini uygulamayıp, yüklemek istediğim imajı kullanıcı bilgisayarlarının C’sine aynı GPO ile kopyalattım ve path olarak orayı gösterdim. Sürüm bilgisi, Windows 10 Pro 1709 OS Build 16299.579.

//////////////////////////////////////////////////////////////////

# Change this to the path where you keep the desired background image
$imagePath = ‘(Path to Image, include single quotes)

$newImagePath = [System.IO.Path]::GetDirectoryName($imagePath) + ‘\’ + (New-Guid).Guid + [System.IO.Path]::GetExtension($imagePath)
Copy-Item $imagePath $newImagePath
[Windows.System.UserProfile.LockScreen,Windows.System.UserProfile,ContentType=WindowsRuntime] | Out-Null
Add-Type -AssemblyName System.Runtime.WindowsRuntime
$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq ‘AsTask’ -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq ‘IAsyncOperation`1’ })[0] Function Await($WinRtTask, $ResultType) {
$asTask = $asTaskGeneric.MakeGenericMethod($ResultType)
$netTask = $asTask.Invoke($null, @($WinRtTask))
$netTask.Wait(-1) | Out-Null
$netTask.Result
}
Function AwaitAction($WinRtAction) {
$asTask = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq ‘AsTask’ -and $_.GetParameters().Count -eq 1 -and !$_.IsGenericMethod })[0] $netTask = $asTask.Invoke($null, @($WinRtAction))
$netTask.Wait(-1) | Out-Null
}
[Windows.Storage.StorageFile,Windows.Storage,ContentType=WindowsRuntime] | Out-Null
$image = Await ([Windows.Storage.StorageFile]::GetFileFromPathAsync($newImagePath)) ([Windows.Storage.StorageFile])
AwaitAction ([Windows.System.UserProfile.LockScreen]::SetImageFileAsync($image))
Remove-Item $newImagePath

4 Comments

  1. merhabalar. bu işlem için yardımınıza ihtiyacım var iletişime geçmeniz mümkünmü acaba

  2. Selamlar,

    Bu script ile yapmaya çalışıyorum ama uygulanmıyor. 🙁

  3. Selam,

    Hangi Windows 10 sürümü ile deniyorsunuz, güncel olanlarda çalışmayabilir. 1809 ve sonrasında test etmedim.

Leave a Comment

Your email address will not be published. Required fields are marked *

Close