Sitemap

Amicuk Programming Answers

Add users to group with file

2015-10-11   Views:5

Advertisement

So I am following power-shell script that I see online. I am trying to add 2 users (as a test for now) from a csv file into an AD group. The AD group name is "IMAllow" I created a file called AddUsersToGroup.ps1 that I am running on windows powe

So I am following power-shell script that I see online.
I am trying to add 2 users (as a test for now) from a csv file into an AD group.
The AD group name is "IMAllow"
I created a file called AddUsersToGroup.ps1 that I am running on windows power-shell.
The file contents are below
# Add User to a Group - PowerShell Script
Import-module ActiveDirectory
Import-CSV "C:\Scripts\Users.csv" | % {
Add-ADGroupMember -Identity IMAllow -Member $_.UserName
And my file with users is called "Users.csv"
wahidta
indenga
I get the following error
Add-ADGroupMember : Cannot validate argument on parameter 'Members'. The argument is null or empty. Supply an argument
that is not null or empty and then try the command again.
At C:\Users\zzwahidta\Scripts\AddUsersToGroup.ps1:7 char:44
+ Add-ADGroupMember -Identity IMAllow -Member <<<<  $_.UserName
    + CategoryInfo          : InvalidData: (:) [Add-ADGroupMember], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.ActiveDirectory.Management.Commands.AddADGrou
   pMember

The replay answer
Advertisement
Get-Help Add-ADGroupMember or http://technet.microsoft.com/en-us/library/ee617210.aspx
$creds = Get-Credential
Add-ADGroupMember -Identity IMAllow -Member $_.UserName -Credential $creds
I hope this post has helped!

Go to See the other 4 answers

Add users to group with file

Category:DefaultRelease time:2015-10-11Views:130

So I am following power-shell script that I see online. I am trying to add 2 users (as a test for now) from a csv file into an AD group. The AD group name is "IMAllow" I created a file called AddUsersToGroup.ps1 that I am running on windows powe[More]

How to add payment advice for XML file filed in vendor account group

Category:DefaultRelease time:2015-10-11Views:130

Hi All, I have a requirment to add Payment advice for XML file field in vendor account group under payment transcation tap, kindly advice where i can add above mention field in vendor account group. thanks khajadoneRead other 2 answers[More]

Can't see calander group's or add a new group in ical 5.0 (lion)

Category:DefaultRelease time:2015-10-11Views:130

Help. Can't add a new group or see my groups when i click on calander in Lion version of ical. Any idea's why? ThanksInfo taken from other discussion threads on Win not recognizing iPhone: NOT SEEN IN ITUNES: Windows 7 uses a MTP driver instead of th[More]

I have an iPad 2 with iOS 5.1 and iBooks version 2.1.1. I have 64GB of storage, 80% is used. iBooks is using 250MB of storage. I have a large number of PDF files in my iBooks library. At this time I can not add another book or PDF file to my library.

Category:DefaultRelease time:2015-10-11Views:130

I have an iPad 2 with iOS 5.1 and iBooks version 2.1.1. I have 64GB of storage, 80% is used. iBooks is using 250MB of storage. I have a large number of PDF files in my iBooks library. At this time I can not add another book or PDF file to my library.[More]

Can't add a new group

Category:DefaultRelease time:2015-10-11Views:130

When I try to add a new group as per instructions, AB fails to add that group. No error messages, nothing. It does not add the group even if I delete a few old ones. Can anyone help? BruceHmmm...I don't know....I wonder whether this could be a file p[More]

Grouping of files in the file system

Category:DefaultRelease time:2015-10-11Views:130

hi all, i am using Forms [32 Bit] Version 6.0.8.24.1 (Production). with the help of host command i am uploading any type of files from user specified location to specified directory. My requirement is like the files should be grouped wile saving to t[More]

When a group of files is selected, how can I copy just the file names?

Category:DefaultRelease time:-0001-11-30Views:130

I used to be able to select a group of files in a finder window, copy, then paste the names in an email or document. It no longer allows this. Is there away around this other than copying each file name individually?I'm also at 10.5.4, just had forgo[More]

Itunes can't add and deletes all my files

Category:DefaultRelease time:-0001-11-30Views:130

i'm trying to add some video clips to my itunes library to later use with apple tv well it crashes everytime and deletes the file or group of files i was attempting to add.See: Syncing to a "New" Computer or replacing a "crashed" Hard[More]

How to add a dba group in Unix after Installation

Category:DefaultRelease time:-0001-11-30Views:130

I need help in figuring out how to add a dba group, which one would do prior to installation, but how can one do it after installation? I need to have a group that will have people allowed to start and stop oracle. Is this possible to modify to do af[More]

Group the files based on their extensions

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I am traversing a dir and listing all the files under that directory. Now i want to group the files based on the extension and just print the number of files with each extension. ex: Extension No.of Files Size of the files .java 10 23455 bytes .h[More]

Selecting a group of files and putting them in a newly created folder?

Category:DefaultRelease time:-0001-11-30Views:130

If I select a group of files in finder or on my desktop -- is there a command to create a new folder and put them in it? (I'm thinking of how you can take a selection in iTUNES and create a playlist from the selection). (I know how to create a folder[More]

Hot
I have 2 iphones and 2 apple ids and i'd like to know how to handle both with just one credit cardOnly one Apple ID can be associated with one credit or debit card account. Do you have a link that verifies that this is Apple's policy? I ask because I [More]
I have a LJ P4015 that is putting a excess toner on the right side of the the paper when duplexing. It doesn't do it on single sided printing. It looks like it should be a fuser problem but I replaced that and it didn't fix it. I've also replaced the [More]
hello! Is it possible to connect my playstation 3 to the iMac so that I could use it as a Monitor to play on? How, and what kind of additional cables will I need? thanks!EyeTV hybrid from apple store solved the problem.Read other 2 answers [More]
Hi, I am working on one JSF project using Java Studio Creator. I have requirement where I have one table and print button. By clicking the print button, I want the contents of table to be printed. I have configured all the required properties of this [More]
Hi, I'm compiling a trigger ORG_LOAN_DATE_BUI_TRG which is having length as 21 chars, but getting the error ORA-00604: error occurred at recursive SQL level 1 ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at [More]
I have been trying to install Cricut creative craft room and it tells me that I need Adobe Air.  My computer shows that I should have it on my computer.  The support team at Cricut tried uninstalling and reinstalling Adobe Air remotely and said that [More]
Hi All, Please any one can help me in exact prerequisites for installing sql server 2008R2 cluster server(two node). Thanks in advance. Maheshwar ReddyHi Please find the pre-requisites for SQL server cluster installation . Before Installing SQL clust [More]
i need to put a itab to select times to print the layout where i need to put it PLSRani, SAPMV45A is the standard program for the Sales orders, you cannot edit that program. If you are getting a POP UP that means, some one has already written has som [More]
I'm hoping someone can help me with a problem. I have an Apple G-4 computer. When I originally purchased it 3-4 years ago I believe it came with OS 9.1 and OSX installed. Both worked fine when I first got it. Through the years I upgraded the OS to 9. [More]
I just don't need this question every time I start the machine.... can't find how to make it go away!Reading problem, FaceTime was asking for a login, and I turned it off!Read other 2 answers [More]