Just to clarify: PowerShell is not required here because wusa(.exe) is a regular executable file, not a cmdlet. Any other way that let you execute a program with elevated rights will do (e.g. cmd.exe, shortcuts, ...)
When we work strictly from Windows Server Core installations we need to be able to do everything from the command line, even user management. Let's add a user that already exists into a group that already exists in Active Directory using only PowerShell.
To do this we have the handy Add-ADGroupMember PowerShell commandlet. This is very easy to use in its basic form, all we need is the name of the group and of the user that we want to add. In this case, I want to add user jane to the group "Domain Admins".
Add-ADGroupMember "Domain Admins" jane
That's it, jane is added automatically. This process, like most, is silent on success. To verify that all is as we want it to be, we can use the Get-ADGroupMember command to look up the members of a group.
Get-ADGroupMember "Domain Admins"
Can also do
Add-ADGroupMember -identity "Domain Admins" -members "jane" -WhatIf
to see if it gets added before actually running the command.
Good article. There is ZERO reason to have a GUI on a Domain Controller. Everything can be done through Server Manager on Windows 10/8
You mean RSAT
Both? You can do a lot of directory management through Server Manager as well.
Ok, agree. Just don't like the Server Manager this much, ugly interface. I want to be sure WHICH drive on WHICH host I'm going to format for example. But that is just my personal opinion and I'm more or less a console fetishist
But when it comes to ADSIedit or AD sites, you really want to have RSAT.
Those options are generally only there is RSAT is installed.
thanks @dafyre looks good, but I have been doing a bit of reading online and I think I will change the output to make it output the data as rows with each user named with what member they are part of next to there name. two columns. in other words the output would be "Transpose" and then I would use a pivot table to do the rest.
still working on it, but if anyone knows of an easy way please do share
I have made some head way, but what I need to know is how do I call the function "MyADGroups" in my script. not sure if the below script is correct, but what it needs to do is check who has access to the parent folder and all the children folders only, if its inherited I do not want to know, which the script does . but if it is a Group it needs to expand the group and show me the users only.
I have done a function but I am not sure if it is correct and it will output the data I need.