简体   繁体   English

Powershell - 为特定用户设置桌面背景(Windows 7和/或2008 Server)

[英]Powershell - set desktop background for specific user (Windows 7 and/or 2008 Server)

Assuming I am logged on as administrator, can I use PowerShell to assign a desktop background image to a specific user account? 假设我以管理员身份登录,是否可以使用PowerShell将桌面背景图像分配给特定用户帐户?

I've seen answers similar to this one Powershell script from shortcut to change desktop where the following is used 我已经看到类似于这一个Powershell脚本的答案, 从快捷方式更改桌面 ,其中使用了以下内容

RegistryKey key = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", true);

Which, I assume, will work for the currently logged on user. 我认为,这将适用于当前登录的用户。 How would I do that for the user that is not logged on (any user)? 如何为未登录的用户(任何用户)执行此操作?

The user did not have a desktop background set before. 用户之前没有设置桌面背景。

Any other automated solution welcome, not limited to PowerShell. 任何其他自动化解决方案欢迎,不仅限于PowerShell。

The general consensus seems to be that you need to load the user's registry hive. 普遍的共识似乎是您需要加载用户的注册表配置单元。 I think this is what you're looking for: http://jrich523.wordpress.com/2012/03/06/powershell-loading-and-unloading-registry-hives/ 我想这就是你要找的东西: http//jrich523.wordpress.com/2012/03/06/powershell-loading-and-unloading-registry-hives/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows 2008 服务器 Powershell Active Directory -> 获取用户创建日期 - Windows 2008 server Powershell Active Directory -> Get user creation date Windows Server AD 2022 - 使用 PowerShell 通过 GPO 将域用户添加到本地组“远程桌面用户” - Windows Server AD 2022 - Add a domain user to the local group "Remote Desktop Users" via GPO using PowerShell 如何在普通用户的Windows Server 2008 R2中设置用户环境变量? - How to set user environment variables in Windows Server 2008 R2 as a normal user? Windows Server 2008系统特定的远程 - Windows Server 2008 System Specific Remote 在 Windows Server 2008 R2 上的 PowerShell 中创建专用队列 - Creating private queues in PowerShell on Windows Server 2008 R2 在Windows Server 2008中:Powershell无法导入模块ActiveDirectory - In Windows Server 2008 : Powershell can't import-module ActiveDirectory 使用Powershell Windows Server 2008 R2将用户导入本地 - Import users to local with powershell windows server 2008 r2 Powershell:Windows Server 2008文件夹浏览器对话框为空白,但不在ISE中 - Powershell: Windows Server 2008 folder browser dialog blank, but not in ISE Windows Server 2008 R1上通过Powershell的SMB - SMB on Windows Server 2008 R1 via Powershell 如何设置平滑过渡的 Windows 10 桌面背景? - How can I set windows 10 desktop background with smooth transition?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM