Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

help with powershell logon script

$
0
0

Hi all,

I need assistance in powershell logon script to run powershell console with administrative privileges for non admin accounts.

Currently below is my logon script but some how i couldn't change my wallpaper of users logging into workstation. I feel because of console not have privilege 

#setting disablefirstwizard settings

Set-itemproperty -path HKLM:\software\Microsoft\windows\internet explorer\main -name disablefirstwizard -value 1

#setting of wallpaper

Set-itemproperty -path HKCU:\Control Panel\Desktop -name wallpaper -value C:\windows\.bmp

rundll32.exe user32.dll, updateperusersystemparameters

Is there a possibility to set console environment so that rest of script will be running under user specified at top irrespective of logged in user(Guest).

$user = "test"

$password = "password"

#setting disablefirstwizard settings

Set-itemproperty -path HKLM:\software\Microsoft\windows\internet explorer\main -name disablefirstwizard -value 1

#setting of wallpaper

Set-itemproperty -path HKCU:\Control Panel\Desktop -name wallpaper -value C:\windows\.bmp

rundll32.exe user32.dll, updateperusersystemparameters

 

Please let me know if i need to add more information.

Thanks in advance.

thanks,

Vamsi


Viewing all articles
Browse latest Browse all 6937

Trending Articles