【注意是锁屏!锁屏!锁屏!,不是桌面壁纸】
$main_user=$env:userprofile$LockPicS=Get-Item"C:\ProgramData\Microsoft\Windows\SystemData"$Backups="$main_user\Pictures\锁屏壁纸导出_"+(Get-Date-Format"yyyy年MM月dd日_dddd_HH时mm分ss秒fff毫秒")New-Item-Path$Backups-ItemTypeDirectory-Force$TestAcl="C:\Users\Public\desktop.ini"FunctionGetPic($temp){Get-Acl$TestAcl|Set-Acl$temp.FullNameforeach($itemin(Get-ChildItem$temp.FullName)){Get-Acl$TestAcl|Set-Acl$item.FullNameif([System.IO.Directory]::Exists($item.FullName)){Get-Acl$TestAcl|Set-Acl$item.FullNameGetPic$item}else{Get-Acl$TestAcl|Set-Acl$item.FullNameCopy-Item$item.FullName$Backups-Force}}}GetPic$LockPicSii$Backups