Quantcast
Channel: Ivanti User Community: Message List - OS Deployment and Provisioning
Viewing all articles
Browse latest Browse all 3345

PowerShell task to add domain users to local group

$
0
0

One last one, here's a quick PowerShell script which you can use to add a domain group (WindowsAdmins) to a local group, in this case Administrators. We add this as a provisioning step so that our desktop support team can administer the station once built. Nice and simple!

 

$computername = Get-Content env:computername

$adgroup =[ADSI]"WinNT://subdomain.domain.com/WindowsAdmins"

$localgroup =[ADSI]"WinNT://$computername/Administrators"

$localGroup.PSBase.Invoke("Add",$adgroup.PSBase.Path)


Viewing all articles
Browse latest Browse all 3345

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>