I’m still new to powershell scripting. I have a csv file with a list of ad computers and the group each machine needs to be added to. I’m trying to build a script to get the adcomputer and add it to the adgroup listed next to each computer in the column.
This is what I’m currently working with and it’s not working. I’m sure I’m confused at this point. Thank you in advance!
Thanks for the help, it worked. However, it seems to have found user accounts as well with some of the names in the list. Had to remove all the new group members. Do you know if I can make it more granular so it only looks for computer as the type?
# Get parameters, examples, full and Online help for a cmdlet or function
(Get-Command -Name Get-ADGroupMember).Parameters
Get-help -Name Get-ADGroupMember -Examples
Get-help -Name Get-ADGroupMember -Full
Get-help -Name Get-ADGroupMember -Online
Get-Help about_*
Get-Help about_Functions
# Find all cmdlets / functions with a target parameter
Get-Help * -Parameter Append
# All Help topics locations
explorer "$pshome\$($Host.CurrentCulture.Name)"