Read group membership for a user object and populate every group with matching user from another domain

I have LON\JSmith in LON domain and DEL\JimSmith in DEL domain
I would like to extract group memberships of LON\JSmith in LON domain and append matching by email (i.e. DEL\JimSmith) user object in every group in LON domain.
for instance
LON\JSmith and DEL\JimSmith is the same person and has same email address [email protected]
LON\JSmith belongs to 3 groups - LON\localadmingroup;LON\univdesktop;LON\globalsurvey
The outcome of the script should be
LON\JSmith; DEL\JimSmith    should be in 3 groups - LON\localadmingroup;LON\univdesktop;LON\globalsurvey.
How can i do it?
Navgup

Hi Navgup,
Please refer to the script below, to query users in other domain by specifying the parameter "-Server" in the cmdlet "get-aduser", and also note I haven't tested the script below:
import-module activedirectory
get-adgroupmember "group"|foreach{
$email=(get-aduser $_.samaccountname -properties *).EmailAddress#get the user email
Get-ADUser -filter {EmailAddress -eq $email} -properties * -server DomainB.company.com|select samaccountname, memberof}#filter user name and group with the email in other domain
To get users across domain, please also refer this blog:
Adding/removing members from another forest or domain to groups in Active Directory:
http://blogs.msdn.com/b/adpowershell/archive/2010/01/20/adding-removing-members-from-another-forest-or-domain-to-groups-in-active-directory.aspx?Redirected=true
I hope this helps.

Similar Messages

  • How can I have a checkbox that a user checks and populates a field with read only text, then if another checkbox is checked it will allow user text input

    Hi
    How can I have a check box that a user checks and populates a field with read only text, then if another check box is checked it will allow user text input into that same field, her is my javascript
    var a ="Not Applicable"
    if (this.getField("Do").value == "Yes")
    a=""
    if (this.getField("DoNot").value =="Yes")
    a=a + ""
    event.value=a
    say if the "Do" cb is checked, Not Applicable would populate the text field, and if the "DoNot" cb is checked it would allow user input into the same text field, the javascript I have will not allow user input,
    thanks for any help I am new to javascript

    Are these fields mutually exclusive?

  • How to see the group membership for a user in oidadmin

    how to see the group membership for a user in oidadmin?
    I see the memberships in oiddas, but I would like to know if its possible to see them in oidadmin? Thanks.

    Hi,
    For what I understand, you know the user and want to know the groups that the user is member of (am i wrong?)...
    With this query you pass the user's DN to the ldapsearch and the search gives you back the list of groups the member is a member of, all you need to do is change the value "uniquemember=cn=orcladmin" in the query for your own user.
    For example:
    $ORACLE_HOME/bin/ldapsearch -h localhost -p 389 -D "cn=orcladmin" -w oracle10g -b "dc=acme,dc=com,dc=au" -s sub "uniquemember=cn=orcladmin" dn
    will give you the list of groups that the user "cn=orcladmin" is a member of.
    $ORACLE_HOME/bin/ldapsearch -h localhost -p 389 -D "cn=orcladmin" -w oracle10g -b "dc=acme,dc=com,dc=au" -s sub "uniquemember=cn=smithj,cn=Users,dc=acme,dc=com,dc=au" dn
    will grive you all the groups that the user smithj is a member of.
    if you don't want to get the DN of the group you can change the last parameter of the query like this
    $ORACLE_HOME/bin/ldapsearch -h localhost -p 389 -D "cn=orcladmin" -w oracle10g -b "dc=acme,dc=com,dc=au" -s sub "uniquemember=cn=smithj,cn=Users,dc=acme,dc=com,dc=au" cn
    will give you the CN of the groups the user is member of.
    let me know if this is what you need.
    Regards,
    Juan

  • Report of Groups owned along with group memberships for each group, all in a single .csv file

    Hello all,
    What I'm trying to do is generate a report of all groups owned by a specific user, along with the group memberships, and output it all to a single .csv file. In the .csv file, I would like to have the group names as the column headers, and underneath
    the group name, list all the members of the group down through the column. So for example, if User1 owns 3 groups, the output would look like:
    What I'm having trouble with is outputting the objects to the .csv using New-Object psobject, and I'm starting to wonder if there is an easier way to do this and my brain is just fried.
    Any ideas?

    OK so I can try and give some code here, but I'm asking more of a concept question about how PowerShell builds objects so I'm not sure it will help....
    $User = "User1"
    get-adgroup -filter {managedby -eq $user} -pr member | %{
    $_.name
    $_.member
    OK so this is a simple script that outputs a group name followed by the membership, all in a single column. What I would like is for the group names to each be the header of a column, and have the membership listed underneath. For example:
    Is this possible in PowerShell?

  • Initially stating No authorization required using Adobe.  When I try to change it so I can transfer downloaded books by my Nook e-reader it I get an error message stating the Adobe user name and password is associated with another computer.  What gives?

    When I set up Adobe reader on my computer to be able to download books from a library and then transfer to my Nook e-reader, I initially stating No authorization required using Adobe.  When I try to change it so I can transfer downloaded books by my Nook e-reader it I get an error message stating the Adobe user name and password is associated with another computer.  What gives?

    This is pretty surprising and wierd that even Reader 10.1.1 is crashing on your system. It works pefectly for me.
    Would it be possible for you to get the crash dump, and upload it, so that I can have a look at the same.
    Download PROCDUMP from <http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx> and extract it to a folder, say, c:\temp\procdump.exe
    Open cmd prompt and type "cd c:\temp".
    Launch the browser and open the PDF.
    Open task manager, sort processed by name. Two AcroRd32.exe instances  should have been launched. Note the PID (a small integer like 5588) corresponding to the AcroRd32.exe with the higher memory usage; this is the process that must be crashing. Note this PID.
    On the cmd window, type "procdump -e -ma 5588 c:\temp\01.dmp" (replace 5588 with the actual PID of the process noted in Step 4). Procdump will now wait for the aoolication to crash. If it throws a EULA, accept it.
    Perform your steps to cause the crash.
    Procdump will have created a dump file at "c:\temp\01.dmp". Zip it up (since it will be 100s of MBs otherwise) and share with me.
    Thanks in advance for all your help
    Ankit

  • How to create a special view for sharepoint list A and deploy this view to specific user personal view?

    How to create a public view for sharepoint list A and deploy this view to specific user personal view? Is that possible OOTB?

    Views cannot be exported or moved. Can you elaborate your requirement?
    --Cheers

  • In 10.8, the file info window's "Kind:" read "Application"/etc. for 64-bit items and "Application (32-bit)"/etc. for 32-bit items. The "(32-bit)" part seems to have been lost in Mavericks. How do I determine if an item is 32 or 64-bit in Mavericks?

    In 10.8, the file info window’s “Kind:” read “Application”/etc. for 64-bit items and “Application (32-bit)”/etc. for 32-bit items.
    The “(32-bit)” part seems to have been lost in Mavericks. How do I determine if an item is 32 or 64-bit in Mavericks?

    1. Launch System Information into its 'report' mode. (A quick way to do this is by holding down the option key while clicking on the Apple menu item, which causes "About this Mac" to change to that.)
    2. From the list on the left, under "Software" click on "Applications." (If you don't see the Applications item, click on "Show more information" from the "File" menu.)
    3. Wait a minute or so for the report to finish.
    4. The last column in the report is "64-bit (Intel)." (You may need to scroll the window to the right to see it.) Click on that heading to sort the list alphabetically. Anything with a "no" is 32 bit.

  • The report server has encountered a configuration error. Logon failed for the unattended execution account. (rsServerConfigurationError) Log on failed. Ensure the user name and password are correct. (rsLogonFailed) The user name or password is incorrect

    I am able to run the report fine in BIDS in the preview window, and it deployes fine.  When it goes to view the report in the browser, I get the following error.  There is no domain, I am using a standalone computer with SQL Server and SSRS on
    this one machine.
    Can anyone point to where I might configure the permission it is looking for?  thanks!  Steven
    The report server has encountered a configuration error. Logon failed for the unattended execution account. (rsServerConfigurationError)
    Log on failed. Ensure the user name and password are correct. (rsLogonFailed)
    The user name or password is incorrect
    Steven DeSalvo

    Hi StevenDE2012,
    Based on the error message "The report server has encountered a configuration error. Logon failed for the unattended execution account. (rsServerConfigurationError)", it seems that the Unattended Execution Account settings in Reporting Services
    Configuration is not correct.
    Reporting Services provides a special account that is used for unattended report processing and for sending connection requests across the network. Unattended report processing refers to any report execution process that is triggered by an event rather than
    a user request. The report server uses the unattended report processing account to log on to the computer that hosts the external data source. This account is necessary because the credentials of the Report Server service account are never used to connect
    to other computers. To configure the account, please refer to the following steps:
    Start the Reporting Services Configuration tool and connect to the report server instance you want to configure.
    On the Execution Account page, select Specify an execution account.
    Type the account and password, retype the password, and then click Apply.
    In addition, please verify you have access to the Report Server database by following steps:
    Go to SQL Server Reporting Services Configuration Manager, make sure the configuration is correct.
    Go to Database, Verify that you can connect to the database.
    Make sure you are granted public and RSExecRole roles.
    Reference:
    Configure the Unattended Execution Account
    Configure a Report Server Database Connection
    If the problem is unresolved, i would appreciate it if you could give us detailed error log, it will help us move more quickly toward a solution.
    Thanks,
    Wendy Fu

  • Issue using ADSI in powershell to load users from another domain into a group

    I am trying to load users into a domain local security group from another domain using ADSI and powershell. For users who have an existing foreign security principal I can load that without issue, but the users who do not have a foreign security principal
    I am unable to load.
    These work fine, assuming the group domain is fabrikam:
    $Group.psbase.invoke("Add",[ADSI]"LDAP://CN=$external_user_sid_who_has_a_FPN,CN=ForeignSecurityPrincipals,DC=fabrikam,DC=com")
    $Group.psbase.invoke("Add",[ADSI]"LDAP://$userDN,DC=fabrikam,DC=com")
    These does not:
    $Group.psbase.invoke("Add",[ADSI]"LDAP://CN=$externaluser_sid_who_does_not_have_a_FPN,CN=ForeignSecurityPrincipals,DC=fabrikam,DC=com")
    $Group.psbase.invoke("Add",[ADSI]"LDAP://<SID=$external_user_sid_who_does_not_have_a_FPN>")
    $Group.psbase.invoke("Add",[ADSI]"LDAP://<SID=$external_user_hex_sid_who_does_not_have_a_FPN>")
    Any help would be greatly appreciated.
    Thank you

    Thank you for your reply,
    I started with that thread and it ultimately recommends using the [ADSI]"LDAP://<SID=$hexsid>, this bind is not working for me. The page it points to for conversion of sid to hexsid is in VBS, but I have used the below powershell to duplicate its function.
    $sid = "S-1-5-21-2127521184-1604012920-1887927527-72713"
    $parts = $sid.Remove(0,6).Split("-")
    foreach ($part in $parts)
    $hex = ([Convert]::ToString($part, 16)).ToUpper()
    While ($hex.length -lt 8)
    $hex = "0" + $hex
    for ($i=1; $i -lt 5; $i++)
    $reverseEndian = $reverseEndian + $hex.substring($hex.length -2, 2)
    $hex = $hex.Remove($hex.length -2, 2)
    $hexSid = "0105000000000005" + $reverseEndian
    For example SID S-1-5-21-2127521184-1604012920-1887927527-72713 needs
    to be turned into raw hex sid 010500000000000515000000A065CF7E784B9B5FE77C8770091C0100 according to that article and
    then put in the ADSI bind like this: [ADSI ]"LDAP://<SID=010500000000000515000000A065CF7E784B9B5FE77C8770091C0100>". 
    When I put that bind in (with an actual sid and not an example sid) I get the following error:
    format-default : The following exception occurred while retrieving member "PSComputerName": "There is no such object on
    the server.
    + CategoryInfo : NotSpecified: (:) [format-default], ExtendedTypeSystemException
    + FullyQualifiedErrorId : CatchFromBaseGetMember,Microsoft.PowerShell.Commands.FormatDefaultCommand
    For users who are on another domain but already have a foreign principal name created, I can add them easily enough by converting their sid to the appropriate foreign principal name format. I haven't yet had any success adding someone who doesn't have a
    foreign principal name though, even after trying the solution referenced in the article.
    Thank you in advance for any help.

  • Happy Holidays.  I have Adobe Actobat 7.0 Standard for quite a while, and I'm happy with it. I use it for mainly filings at the federal court.  They require PDF.  I use two computers in two different states for work.  I realize my Adobe 7.1 is a few years

    .  I have Adobe Actobat 7.0 Standard for quite a while, and I'm happy with it. I use it for mainly filings at the federal court.  They require PDF.  I use two computers in two different states for work.  I realize my Adobe 7.1 is a few years old, but sometimes I have difficulty using it with the other days downloading a boarding pass, and e filing at the USDC. .  There's a problem with Adobe Flash, media, etc.  and other Adobe programs, (which I use for downloading boarding passes for airlines, etc.) so basically I have to delete these other Adobe programs, besides the Adobe Acrobat 7.0 Standard if I want to 7.0 Standard to work.  I periodically download the updates, but there's still a problem. My question is:  Can or should I purchase another program to update the present Adobe Acrobat 7.0 standard, or just buy a new program such as the Adobe 11?  Am I mistakenly doing something wrong, such as when I download?  I'm an old valued customer so I don't want to spend a lot of money since I am replacing my Dell XP for a new computer now, and my other computer is a Dell Vista.
    I'd appreciate your valued advice.

    If you are getting a new computer (for a PC it would have Win 7 or 8), then you will need to purchase XI if you wish to continue using Acrobat. Acrobat 7 is not compatible with these systems (and probably the same for MAC systems), though sometimes workarounds are possible, though not easy to use. I guess the answer is to buy the new version. Try http://www.adobe.com/products/catalog/software._sl_id-contentfilter_sl_catalog_sl_software _sl_mostpopular.html, click on the Buy for Acrobat, and then select the version you want.

  • I am having a lot of trouble downloading itunes.My latest error message is that MediaToolbox.dll is missing. I have been trying to fix this for three days now .And it all started with the last update .Can anyone help?

    I am having a lot of trouble downloading itunes.My latest error message is that MediaToolbox.dll is missing. I have been trying to fix this for three days now .And it all started with the last update .Can anyone help?

    Taken at face value, you're having trouble with an Apple Application Support program file there. (Apple Application Support is where single copies of program files used by multiple different Apple programs are kept.)
    Let's try something relatively simple first. Restart the PC. If you're using Vista or 7, now head into your Uninstall a program control panel, select "Apple Application Support" and then click "Repair". If you're using XP, head into your Add or Remove Programs control panel, select "Apple Application Support", click "Change" and then click "Repair".
    If no joy after that, try the more rigorous uninstall/reinstall procedure from the following post. (If you've got XP, although the procedure is for Vista and 7, just read "Computer" as "My Computer", read "Uninstall a program control panel" as "Add or Remove programs control panel" and assume the system is 32-bit, and you'll be doing the right things.)
    Re: I recently updated to vista service pack 2 and I updated to itunes 10.2.1 and ever

  • HT4108 ok so i got the GSI HDMI Cable Adapter for my iphone 4s and it wont play anything i bought from itunes as far as movies???

    ok so i got the GSI HDMI Cable Adapter for my iphone 4s and it wont play anything i bought from itunes as far as movies???

    I just bought a GSI HDMI Cable Adapter for my IPad2, which is running IOS 8.  The adapter is not even recognized by the ipad.

  • Hi all! What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    Buying more hard drive space is a very valid option, here.  Editing takes up lots of room, you should never discount the idea of adding more when you need it.
    Another possibility is exporting to MXF OP1a using the AVC-I codec.  It's not lossless, but it is Master quality.  Plus the file size is a LOT smaller, so it may suit your needs.

  • Error: Contract object  and business agreement  do not match

    Dear Friends,
    I get this error on the service order.
    Contract object  and business agreement  do not match
    Any assistance would be appreciated.
    Thanks and regards,
    Aershid

    Thanks Experts...
    Sany.

  • Hi I've a big problem with adobe acrobat reader XI pro and I hope you can help me. The problem is; when I past copied text from some pdf books (not all of them) it past symbols only! wherever I past it! and even if I coped that text from another pdf reade

    Hi
    I've a big problem with adobe acrobat reader XI pro and I hope you can help me.
    The problem is; when I past copied text from some pdf books (not all of them) it past symbols only! wherever I past it! and even if I coped that text from another pdf reader (adobe pdf reader, internet browsers, ...etc.).
    This problem started to happen since yesterday when I installed adobe acrobat reader XI pro to try it before I buy it, and before that when I was using the free adobe pdf reader I was totally able to copy any text from any pdf and past it anywhere with nothing wrong.
    What can I do?
    thank you a lot.

    There is no product called Adobe Acrobat Reader Pro. There is
    - Adobe Acrobat Pro ($$)
    - Adobe Reader (free)
    Which do you have? And are you a programmer?

Maybe you are looking for

  • IPhone isn't recognized by iTunes

    I can't sync my iPhone but my iPod does. Furthermore, all services, physical connections appear to be running/operable. iTunes diagnostic test even showed every possible service I could think of working but returned a sync test result of "no ipod, ip

  • "sent" messages in Mail

    I use my iPad to read mail on three accounts: iCloud and two POP accounts hosted on GoDaddy. Mail has kept every SENT eMail since I bought the iPad. When I try to EDIT them, I can only select a few at a time to move to the trash. Tapping EDIT brigs u

  • Safari 6 won't load youtube

    All the software are up to date I have tried reset safari, open in 32 bit mode, but nothing works. It's not the video won't load, but the site. Nothing happens after I press enter. I have tried other browsers, and youtube works just fine. Any idea ho

  • Idlj bug: compiler generates stubs files 1000 of times...

    The idlj compiler generates client stubs multiple times while compiling a single idl file. For example the following idl file results in the idlj compiler generating the client stubs 5 times: module com { module adobe { module ids {      module prefe

  • ItemRenderer by gridCell, DataGrid questions

    Hi All, I am using a DataGrid with 3 columns to display data. 1st colum is just a label - non editable text, 2nd column is where I want to set/unset an itemRenderer (in this case a comboBox), 3rd column is a label - non editable or a text editable fi