Export user and OU

I have been able to export a list of disabled users and computers and their DN, but I'm trying to find a way to just get username, objecttype and OU.
Right now 
Search-ADAccount -AccountDisabled | FT Name,ObjectClass,DistinguishedName -A
gives me a output I can work with but I'd like to drop the CN= part of the DN and just have the full OU. I can't seem to figure out how to even get started here. Do I need to go line by line using
get-aduser? 

Hi,
Here's something you can play with:
Search-ADAccount -AccountDisabled |
Select Name,ObjectClass,@{N='OU';E={(Get-ADOrganizationalUnit ($_.DistinguishedName.Substring($_.DistinguishedName.IndexOf(',OU=')+1))).Name}}
This assumes that these objects are actually in OUs, not containers.
Don't retire TechNet! -
(Don't give up yet - 13,085+ strong and growing)

Similar Messages

  • Export users and groups

    Hi all,
    i saw a thread about getting a list of all users from the repository, but can find it anymore..
    How can i get a list from all users in OBIEE with there full name and it would be even better if the groups could be included too.
    I can get a list with usernames from the catalog administrator tool, but i need full names.
    regards,
    Osman

    Hi,
    You can view users and groups in presentation services.Go to Settings->Admin->Manage Preenttaion Catalog->show all group and user
    If you can get their full name from rpd.
    If you are using external table authentication you can get them from db table.
    I am not sure about exporting them.. :)
    Thanks,
    Srikanth

  • How to export users and their roles/responsibilities from OBIEE 11g weblogic console ? (we have nearly 8000 users)

    Hi Gurus,
    I am not an expert in the OBIEE 11g security area, we have an urgent requirement where in i need to obtain the complete list of all users along with their roles/responsibilities.Ours is a big organization and there are nearly 8000 users. Please advice if i need to write any weblogic script (WLST) or is there any other simple way for this..
    Thanks,

    If it is through Presentation Layer,Below the steps you can follow:-
    1. Open the OBIEE 11G RPD (offline/online) in Administration Tool
    2. Select the ALL/required presentation objects form your Presentation Layer and right-click.
    3. On the context menu select “Permission Report”
    4 .The Permission Report dialog displays the name and a description of the selected presentation object,
    along with a list of users/application roles and their permissions. CLick the Save button to save the permissions in CSV format.
    5.Once you saved to a CSV format, you can use that report for the quick auditing of security management.
    Below the screen shot for the same
    http://www.4shared.com/photo/h1EKYgh1/zrclip_002p5719bc78.html
    Mark if helps.
    Thanks,

  • How to export user master data in SAP HANA?

    We have a HANA server SP7 and we need to migrate it to a new server which will also be HANA SPS7. However the backup/restore approach is not to be used as confirmed by client. We are going to perform a export/import of all the important schemas. The question here is how to take an export of the users and roles in this scenario

    Hi Meenu,
    As Michael mentioned you can't export roles and users in a general way.
    To add to it, you can always export users and roles if they are created used development workbench. That means if your developer has created any repository roles or users using development workbench or WebIDE you can export them by assigning those roles/privileges to a package/delivery unit. Make use of studio/HALM/CTS for that.
    However to export users and roles created by admin workbench using gui can't be exported.
    Happy HANA
    **Deepak Chodha

  • How to use EXPORT  (user option)  ... IMPORT  for migrating ROLES and SYNONYMS

    Hi,
    I want to export a user from one machine to another one. And I have many roles and synonyms to migrate also. How to export / import them because when I import, I have only tables not roles and synonyms.
    Thanks.

    as far as I know, export doesnt export synonyms and roles.
    What I do is write sql scripts that create scripts to recreate all public synonyms, private synonyms, and roles.
    YOu want to roles created ahead of time anyway so that the import can do the grants.

  • How to export a user and their schema from one 10g database to another?

    Hi,
    I would like to export a user and their entire schema from one 10g database to another one. How do I do this?
    thx
    adam

    If you want to export a user and the schema owned to the user, and import to the same user in a different database, or a different user in the same database, you can use the exp and imp commands as described in the Utilities manual.
    These commands are very versatile and have a lot of options - well worth learning properly. To give you a simplistic shortcut, see below - I create a user 'test_move', create some objects in the schema, export, create a new user in the database 'new_move' and import.
    oracle@fuzzy:~> sqlplus system/?????
    SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 11 21:46:54 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> create user test_move identified by test_move;
    User created.
    SQL> grant create session, resource to test_move;
    Grant succeeded.
    SQL> connect test_move/test_move
    Connected.
    SQL> create table test (x number);
    Table created.
    SQL> insert into test values (1);
    1 row created.
    SQL> exit
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    oracle@fuzzy:~> exp system/????? file=exp.dmp owner=test_move
    Export: Release 10.2.0.1.0 - Production on Sat Mar 11 21:48:34 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user TEST_MOVE
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user TEST_MOVE
    About to export TEST_MOVE's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    . about to export TEST_MOVE's tables via Conventional Path ...
    . . exporting table                           TEST          1 rows exported
    . exporting synonyms
    . exporting views
    . exporting stored procedures
    . exporting operators
    . exporting referential integrity constraints
    . exporting triggers
    . exporting indextypes
    . exporting bitmap, functional and extensible indexes
    . exporting posttables actions
    . exporting materialized views
    . exporting snapshot logs
    . exporting job queues
    . exporting refresh groups and children
    . exporting dimensions
    . exporting post-schema procedural objects and actions
    . exporting statistics
    Export terminated successfully without warnings.
    oracle@fuzzy:~> sqlplus system/?????
    SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 11 21:49:23 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> create user new_move identified by new_move;
    User created.
    SQL> grant create session, resource to new_move;
    Grant succeeded.
    SQL> exit
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    oracle@fuzzy:~> imp system/????? file=exp.dmp fromuser=test_move touser=new_move
    Import: Release 10.2.0.1.0 - Production on Sat Mar 11 21:50:12 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Export file created by EXPORT:V10.02.01 via conventional path
    import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
    . importing TEST_MOVE's objects into NEW_MOVE
    . . importing table                         "TEST"          1 rows imported
    Import terminated successfully without warnings.
    oracle@fuzzy:~>                                                       If moving between databases, remember to set the SID properly before the import. If keeping the same userid, skip the from/to stuff in the import.
    There are many variations on the theme ...
    You can simplify this. You can select tables individually. You can use a parameter file. You can transport all the constraints and data. You can skip the data and only move the definitions. You can get some help (imp/exp help=yes).
    And, if it's all 10g, there is a new and improved facility called expdp/impdp (dp = data pump) which has a lot more capability as well, including direct transfer (no intermediate file) together with suspend/restart. Also documented in the Utilities manual.

  • Finding out the source user and tablespace in a database export

    Hi folks,
    Lets say a customer gave us a export of their DB using expdp or exp, whats the best way to find out what users and tablespaces are in that export? With exp Ive used imp and created a index file but it seems a datapump export doesnt give up this information so easily. Short of going back to a customer and asking, whats the best technique?
    -Mark

    No this doesnt really give enough info. It give a hint toward the tablespace but not the user:
    $ grep "ORCH" test.sql
    sys.dbms_logrep_imp.instantiate_schema(schema_name=>SYS_CONTEXT('USERENV','CURRENT_SCHEMA'), export_db_name=>'ORCHTST.VODACOM.CORP', inst_scn=>'53131043');
    In the above example I know the user and tablespace will contain the charaters "ORCH" in part and this only shows the one entry.

  • Export users , roles and tablespace definotion

    Hello,
    I would like to export (and after then import to another DB) users and roles from DB. How can I simply do this?
    And second question: how can I export tablespace definitions?
    Thanks
    SASA

    $ exp help=y
    Export: Release 8.1.7.4.0 - Production on Fri Oct 31 14:01:52 2003
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    You can let Export prompt you for parameters by entering the EXP
    command followed by your username/password:
    Example: EXP SCOTT/TIGER
    Or, you can control how Export runs by entering the EXP command followed
    by various arguments. To specify parameters, you use keywords:
    Format: EXP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
    Example: EXP SCOTT/TIGER GRANTS=Y TABLES=(EMP,DEPT,MGR)
    or TABLES=(T1:P1,T1:P2), if T1 is partitioned table
    USERID must be the first parameter on the command line.
    Keyword Description (Default) Keyword Description (Default)
    USERID username/password FULL export entire file (N)
    BUFFER size of data buffer OWNER list of owner usernames
    FILE output files (EXPDAT.DMP) TABLES list of table names
    COMPRESS import into one extent (Y) RECORDLENGTH length of IO record
    GRANTS export grants (Y) INCTYPE incremental export type
    INDEXES export indexes (Y) RECORD track incr. export (Y)
    ROWS export data rows (Y) PARFILE parameter filename
    CONSTRAINTS export constraints (Y) CONSISTENT cross-table consistency
    LOG log file of screen output STATISTICS analyze objects (ESTIMATE)
    DIRECT direct path (N) TRIGGERS export triggers (Y)
    FEEDBACK display progress every x rows (0)
    FILESIZE maximum size of each dump file
    QUERY select clause used to export a subset of a table
    VOLSIZE number of bytes to write to each tape volume
    The following keywords only apply to transportable tablespaces
    TRANSPORT_TABLESPACE export transportable tablespace metadata (N)
    TABLESPACES list of tablespaces to transport
    Export terminated successfully without warnings.

  • Export list of users and passwords for migration to new domain

    Hello,
    i am in the planning phases of moving a SBS2008 domain to Windows Server 2012 AD domain.  i have looked into ADMT but it refuses to install on SBS2008 (error: not a valid win32 application).  is there another avenue i can look into that will help
    me export all SBS domain users and their passwords, and import them into my 2012 domain?
    cheers,
    Jonathan Horne

    Hi,
    Regarding your request, if you want to migrate SBS 2008 to Windows Server 2012 Standard, please refer to the following article.
    Transition from Small Business Server to Standard Windows Server
    http://blogs.technet.com/b/infratalks/archive/2012/09/07/transition-from-small-business-server-to-standard-windows-server.aspx
    As it mentioned, you could first join the Windows Server 2012 Standard server to the current SBS domain and promote it as an additional DC, then it will have the user objects on it.
    Hope it helps.
    Best Regards,
    Andy Qi
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Andy Qi
    TechNet Community Support

  • Unable to export Groups and users list

    Hi,
    We have just upgrade BO from XIR2 to V3.0. We need to create an Excel file wich shows links between all users and all groups. Is it possible to query the repository ? Does it exist a functionality in the CMC interface to copy quickly all the links between all users and all groups into an Excel file ? We have to many links (1000 users and 40 groups) to do it manualy.

    you can have this from the audit schema if you have your audit services is enabled for some specific servers.
    then you can use query builder to query the audit schema about users, groups , reports and all the objects related to the business objects system.
    dorp me some mail i will guide you to some good third party software which do all those things for you with easy and fast way,
    good luck
    Amr

  • Export User Id and Passowords from User Administration

    Hi
    I have exported users from Dev to QA Portal. Users are successfully imported to QA, but when I tried to login with the DEV password I am unable to login.
    Do we have to manually change the password for each user id transported from DEV.
    Thanks
    Murthy

    Hi Murthy,
    Yes, you have to assign the initial PWD for all the user ID's. With eport you will get the roles, groups etc exported not the PWD.
    Thanks.
    Sushil

  • Xml import of users and groups - webex connect mode

    Hi all,
    is there a way to import a *.xml file with users/groups?
    We´re using Jabber for Windows in a cloud based environment and i´m wondering if its possible to import /export users in the same way it was possible with the webex connect client...
    e.g.
    ?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <buddylist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <group>
    <gname>Sales</gname>
    <uname>[email protected]</uname>
    </group>
    Steffen

    We have almost completed this feature and if all goes to plan we'll include the feature in the next MR, 9.2.3 which be available early July.

  • Multiple iMac users and iTunes

    I have setup our iMac with multiple users. I migrated all our digital music to one user and found all the cover art, etc to make it work well. Now I want to allow all the other users to access that music library. I have tried everything from adding the files from a shared folder to exporting it to physically copying all the files and cover art to a different folder for each user. Exporting doesn't work at all, and there doesn't seem to be a way to simply share the same music files across users on an iMac. The closest was physically copying the files, but that means gigabytes of duplicated files for each user, and it still loses some of the covert art. There has to be a solution to this, or Apple has missed a critical function for the multiple user feature. Please help.

    Quit iTunes.
    Move \Music\iTunes\ folder to the Shared folder.
    Hold Option when starting iTunes and select *Choose existing library* then select the iTunes library file in \Shared\iTunes\.
    iTunes can only be opened by one user at a time so each will need to quit iTunes when they are off the computer.

  • Bulk create Active Directory Users and Groups in PowerShell using Excel XLSX source file instead of CSV

    Hi Scripting Guy.  I am a Server Administrator who is very familiar with Active Directory, but new to PowerShell.  Like many SysAdmins, I often need to create multiple accounts (ranging from 3-200) and add them multiple groups (ranging
    from 1 - 100).  Previously I used VBS scripts in conjunction with an Excel .XLS file (not CSV file).  Since VBS is essentially out the door and PowerShell is in - I am having to re-create everthing.
    I have written a PowerShell script that bulk creates my users and adds them to their corresponding groups - however, this can only use a CSV file (NOT an XLS file).  I understand that "CSV is much easier to use than Excel worksheets", but
    most times I have three sets of nearly identical groups (for Dev, QA and Prod).  Performing Search and Replace on the Excel template across all four Worksheets ensures the names used are consistent throughout the three environments.
    I know each Excel Worksheet can be exported as a separate CSV file and then use the PowerShell scripts as is, but since I am not the only SysAdmin who will be using these it leads to "unnecessary time lost", not to mention the reality that even
    though you clearly state "These tabs need to be exported using this naming standard" (to work with the PowerShell scripts) that is not the result.
    I've been tasked to find a way to modify my existing PowerShell/CSV scripts to work with Excel spreadsheets/workbooks instead - with no success.  I have run across many articles/forums/scirpts that let you update Excel or export AD data into an Excel
    spreadsheet (even specifying the worksheet, column and row) - but nothing for what I am trying to do.
    I can't imagine that I am the ONLY person who is in this situation/has this need.  So, I am hoping you can help.  How do I modify my existing scripts to reference "use this Excel spreadsheet, and this specific worksheet in the spreadsheet
    prior to performing the New-ADUser/Add-ADGroupMember commands".
    For reference, I am including Worksheet/Column names of my Excel Spreadsheet Template as well as the first part of my PowerShell script.  M-A-N-Y T-H-A-N-K-S in advance.
       Worksheet:  Accounts
         Columns: samAccountName, CN_DisplayName_Name, sn_LastName, givenName_FirstName, Password, Description, TargetOU
       Worksheets:  DevGroups / QAGroups / ProdGroups
         Columns:  GroupName, Members, MemberOf, Description, TargetOU
    # Load PowerShell Active Directory module
    Write-Host "Loading Active Directory PowerShell module." -foregroundcolor DarkCyan # -backgroundcolor Black
    Import-Module ActiveDirectory
    Write-Host " "
    # Set parameter for location of CSV file (so source file only needs to be listed once).
    $path = ".\CreateNewUsers-CSV.csv"
    # Import CSV file as data source for remaining script.
    $csv = Import-Csv -path $path | ForEach-Object {
    # Add '@saccounty.net' suffix to samAccountName for UserPrincipalName
    $userPrincinpal = $_."samAccountName" + "@saccounty.net"
    # Create and configure new AD User Account based on information from the CSV source file.
    Write-Host " "
    Write-Host " "
    Write-Host "Creating and configuring new user account from the CSV source file." -foregroundcolor Cyan # -backgroundcolor Black
    New-ADUser -Name $_."cn_DisplayName_Name" `
    -Path $_."TargetOU" `
    -DisplayName $_."cn_DisplayName_Name" `
    -GivenName $_."givenName_FirstName" `
    -SurName $_."sn_LastName" `
    -SamAccountName $_."samAccountName" `
    -UserPrincipalName $userPrincinpal `

    Here is the same script as a function:
    Function Get-ExcelSheet{
    Param(
    $fileName = 'C:\scripts\test.xls',
    $sheetName = 'csv2'
    $conn = New-Object System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source = $fileName;Extended Properties=Excel 8.0")
    $cmd=$conn.CreateCommand()
    $cmd.CommandText="Select * from [$sheetName$]"
    $conn.open()
    $cmd.ExecuteReader()
    It is called like this:
    Get-ExcelSheet -filename c:\temp\myfilename.xslx -sheetName mysheet
    Do NOT change anything in the function and post the exact error.  If you don't have Office installed correctly or are running 64 bits with a 32 bit session you will have to adjust your system.
    ¯\_(ツ)_/¯
    HI JRV,
    My apologies for not responding sooner - I was pulled off onto another project this week.  I have included and called your Get-ExcelSheet function as best as I could...
    # Load PowerShell Active Directory module
    Write-Host "Loading Active Directory PowerShell module." -foregroundcolor DarkCyan # -backgroundcolor Black
    Import-Module ActiveDirectory
    Write-Host " "
    # JRV This Function Loads the Excel Reader
    Function Get-ExcelSheet{
    Param(
    $fileName = 'C:\scripts\test.xls',
    $sheetName = 'csv2'
    $conn = New-Object System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source = $fileName;Extended Properties=Excel 8.0")
    $cmd=$conn.CreateCommand()
    $cmd.CommandText="Select * from [$sheetName$]"
    $conn.open()
    $cmd.ExecuteReader()
    # Set parameter for location of CSV file (so source file only needs to be listed once) as well as Worksheet Names.
    $sourceFile = ".\NewDocClass-XLS-Test.xlsx"
    # Add '@saccounty.net' suffix to samAccountName for UserPrincipalName
    $userPrincinpal = $_."samAccountName" + "@saccounty.net"
    # Combine GivenName & SurName for DisplayName
    $displayName = $_."sn_LastName" + ". " + $_."givenName_FirstName"
    # JRV Call the Get-ExcelSheet function, providing FileName and SheetName values
    # Pipe the data from source for remaining script.
    Get-ExcelSheet -filename "E:\AD_Bulk_Update\NewDocClass-XLS-Test.xlsx" -sheetName "Create DocClass Accts" | ForEach-Object {
    # Create and configure new AD User Account based on information from the CSV source file.
    Write-Host " "
    Write-Host " "
    Write-Host "Creating and configuring new user account from the CSV source file." -foregroundcolor Cyan # -backgroundcolor Black
    New-ADUser -Name ($_."sn_LastName" + ". " + $_."givenName_FirstName") `
    -SamAccountName $_."samAccountName" `
    -UserPrincipalName $userPrincinpal `
    -Path $_."TargetOU" `
    Below is the errors I get:
    Exception calling "Open" with "0" argument(s): "The 'Microsoft.Jet.OLEDB.4.0'
    provider is not registered on the local machine."
    At E:\AD_Bulk_Update\Create-BulkADUsers-XLS.ps1:39 char:6
    + $conn.open()
    + ~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException
    Exception calling "ExecuteReader" with "0" argument(s): "ExecuteReader
    requires an open and available Connection. The connection's current state is
    closed."
    At E:\AD_Bulk_Update\Create-BulkADUsers-XLS.ps1:40 char:6
    + $cmd.ExecuteReader()
    + ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException

  • I'm a Dropbox user and I migrate between my iMac and a Toshiba notebook.  Is there Apple software that will work on the notebook allowing me to open Pages, Numbers or Keynote documents that I've placed in Dropbox?

    I'm a Dropbox user and I migrate between my iMac and a Toshiba notebook.  Anyone know if there is Apple software that will work on the Toshiba that will allow me to open Pages, Numbers or Keynote documents when I access them in Dropbox? 
    Maybe I should just always export from Pages into Word  (and likewise for the other types) before I upload to Dropbox?  I hope not!!

    If you don't want to export files and consider the Microsoft formats to be your basic working format, then you need to consider either using MsOffice for Mac or LibreOffice instead of the iWork suite.
    You could always run a virtualised OSX on the Toshiba, but I don't think Apple will appreciate me telling you how to do that.
    Peter

Maybe you are looking for

  • ITunes won't open -error: The folder "iTunes" cannot be found or created...

    Hello, I am not able to open my iTunes. I was able to use it yesterday. I keep getting the message: *The folder "iTunes" cannot be found or created, and is required. The default location for this folder is inside the "My Music" folder.* I have create

  • My HD needs to be Repaired every month. Is this normal?

    I joined the Apple family in February 2012 with the purchase of my MacBook Pro 15". The MBP has been working absolutely wonderfully and confirms why I gave up on Windows and PCs. The only "fly in the soup" has been that I must run Repair Disk at leas

  • Protocol error 4004 with Chatter SYNCERR_FILE_NOT_OPEN using ChatterMail

    I use Chatter on my Treo 700p, HotSync Manager 7.0.2, XP Home, getting the error(s) shown below.  It's not the PMTRACEDB problem, I've used FileZ to change the backup attribute and that has no effect.  Any experience in resolving this is welcomed. Ch

  • Help! Images replaced by thumbnails?

    I recently exported my aperture library into iphoto and for some odd reason many, but not all, of the images now in iPhoto are thumbnails around 400kb - they should be 2MB + files! Seems somehow the originals were replaced by thumbnails. I exported b

  • Qtcreator-1.3.0 PKGBUILD

    Just like the qt-doc 4.6. I've modified the PKGBUILD from abs tu build qtcreator-1.3.0. http://kkrzewniak.gsoftware.pl/download - LD.tar.bz2 pkgname=qtcreator pkgver=1.3.0 pkgrel=1 _qtver=4.6.0 pkgdesc="Lightweight, cross-platform integrated developm