Import-csv consisting of permissions and users

I have exported a csv via powershell and i am looking use that csv to import and edit some ad objects.  any assistance would be appreciated.  this is what i have cobbled together so far:
Get-ReceiveConnector <RelayName> | import-csv c:\scripts\permissions.csv | % {Add-ADPermission –User $_.user –ExtendedRights $_.Permissions}
TIA

when i use your get-receiveconnector script my csv file looks like this:
PSComputerName
RunspaceId
AccessRights
ExtendedRights
ChildObjectTypes
InheritedObjectType
Properties
Deny
InheritanceType
User
Identity
IsInherited
IsValid
exchangereceive.com
d767dfd3-b03d-4fa9-8c78-b38a80dda06c
System.DirectoryServices.ActiveDirectoryRights[]
Microsoft.Exchange.Configuration.Tasks.ExtendedRightIdParameter[]
TRUE
All
DOMAIN1\ExchangeLegacyInterop
exchangerecev\Default receive
FALSE
TRUE
If i were to use your second script wouldnt it have to be modified so that the user that requires the rights is included?
That is because it is a real CSV file.  It needs to be loaded with Import-Csv
¯\_(ツ)_/¯

Similar Messages

  • Issueswith permissions and user's home subfolders.

    How do I fully unlock a folder which belongs to a different account?? Ive set permissions for the specific folder correctly. ALL users should be able to edit the folder
    and it's files, but it doesnt work. In Adobe Flash I get the error: +File is locked, the swf file can't be changed.+ But sure enough it's unlocked for admin, this user and everyone else! I'm having similar issues
    with other applications and sometimes I can't even copy/paste files between different users (home subfolders)
    If all users are admins, how come I get these annoying permission issues all the time? I;ve setup two accounts for the sake of easyness. I'm the only user of this computer
    and I would like to edit and change everything from within all my user accounts! How do I do that? Everything seems to be locked and if I change permissions, I'm still having problems
    as mentioned above.
    <Edited by Host>

    Even an administrative account doesn't automatically have access to everything. You may be running into issues related to trying to change a file that your current owner doesn't own. You can have the owner of the item change the permissions to allow others access, or you can use an *Access Control List*.
    An ACL entry can provide additional access, for example your user's *Drop Box* folder has entries to allow additional access to items dropped in it by others. The normal way to set this up would be to create a shared folder in an area accessible by everyone (for example, /Users/Shared), and then add ACL entries to the folder for the desired access. From the Terminal, the command to give everyone access to do about anything to a contained file would be something likechmod -R +a "everyone allow list,addfile,search,delete,add_subdirectory,delete_child,chown,file_inherit,directoryinherit" /path/to/your/shared/folder
    Once the folder is set up, items created or copied (not dragged) there will have the additional access permissions applied. If you are not comfortable with using the Terminal, TinkerTool System is a handy utility to manipulate ACLs and/or see what access your user has.

  • Changing permissions and user groups in 10.5/10.6

    I recently installed a second hard drive into my mac pro. i noticed that the permissions for the volume on this drive and all of the files on it are as follows:
    johnhorner (me) "read/write"
    staff sometimes "read/write", sometimes just "read only"
    everyone "read only"
    i don't remember ever setting up a group named staff and can't find it listed anywhere. the startup volume has a different set of permissions listed:
    johnhorner (me) read/write
    admin "read/write"
    everyone "read"
    can anyone tell me where "staff" came from and how i can change it to match the same set of permissions on the startup drive?
    i would like them to match because i am using some backup software which triggers if the permissions don't match. furthermore, the permissions displayed in the sync software show for example "rwx r-x r-x" or "rw- r-- r--". in setting the permissions in the get info panel for a given file or folder, i don't see how to change the "x" part of the permissions, only the read and write. does anyone know how to change the "x" aspect of the permissions?
    any help would be much appreciated.
    thanks,
    jhorner

    Carolyn Samit wrote:
    HI,
    The only time it's necessary to repair permissions is before and after software updates.
    Some permissions can be safely ignored.. http://support.apple.com/kb/TS1448
    Which is exactly what I've done since 10.2
    These messages are not "errors" that mean anything is wrong. Nothing is wrong, and some future update will likely address the issue. For now they can simply ignore them.
    BTW, when you run DU and repair disk permissions, make sure and Quit all other open applications. That can speed things up.
    BTDTGT. Under 10.5.6, it used to take about 10 - 15 minutes, so when I passed the 25 minute mark under 10.5.7 with no progress, I stopped DU and tried again with Onyx. After the same amount of delay, I posted my question only to get a snide reply. It finally finished but I don't know what the final elapsed time was as I ignored that computer while I did things on another one.

  • Using PowerShell to import CSV data from Vendor database to manipulate Active Directory Users

    Hello,
    I have a big project I am trying to automate.  I am working in a K-12 public education IT Dept. and have been tasked with importing data that has been exported from a vendor database via .csv file into Active Directory to manage student accounts. 
    My client wants to use this data to make bulk changes  to student user accounts in AD such as moving accounts from one OU to another, modifying account attributes based on State ID, lunchroom ID, School, Grade, etc. and adding new accounts / disabling
    accounts for students no longer enrolled.
    The .csv that is exported doesn't have headers that match up with what is needed for importing in AD, so those have to be modified in this process, or set as variables to get the correct info into the correct attributes in AD or else this whole project is
    a bust.  He is tired of manually manipulating the .csv data and trying to get it onto AD with few or no errors, hence the reason it has been passed off to me.
    Since this information changes practically daily, I need a way to automate user management by accomplishing the following on a scheduled basis.
    Process must:
    Check to see if Student Number already exists
    If yes, then modify account
    Update {School Name}, {Site Code}, {School Number}, {Grade Level} (Variables)
    Add correct group memberships (School / Grade Specific)
    Move account to correct OU (OU={Grade},OU=Students,OU=Users,OU={SiteCode},DC=Domain,DC=net)
    Remove incorrect group memberships (School / Grade Specific)
    Set account status (enabled / disabled)
    If no, create account
    Import Student #
    Import CNP #
    Import Student name
    Extract First and Middle initial
    If duplicate name exists
    Create log entry for review
    Import School, School Number, Grade Level
    Add to correct Group memberships (School / Grade Specific)
    Set correct OU (OU={Grade},OU=Students,OU=Users,OU={SiteCode},DC=Domain,DC=net)
    Set account Status
    I am not familiar with Powershell, but have researched enough to know that it will be the best option for this project.  I have seen some partial solutions in VB, but I am more of an infrastructure person instead of scripting / software development. 
    I have just started creating a script and already have hit a snag.  Maybe one of you could help.
    #Connect to Active Directory
    Import-Module ActiveDirectory
    # Import iNOW user information
    $Users = import-csv C:\ADUpdate\INOW_export.csv
    #Check to see if the account already exists in AD
    ForEach ( $user in $users )
    #Assign the content to variables
    $Attr_employeeID = $users."Student Number"
    $Attr_givenName = $users."First Name"
    $Attr_middleName = $users."Middle Name"
    $Attr_sn = $users."Last Name"
    $Attr_postaldeliveryOfficeName = $users.School
    $Attr_company = $users."School Number"
    $Attr_department = $users."Grade Level"
    $Attr_cn = $Attr_givenName.Substring(0,1) + $Attr_middleName.Substring(0,1) + $Attr_sn
    IF (Get-ADUser $Attr_cn)
    {Write-Host $Attr_cn already exists in Active Directory

    Thank you for helping me with that before it became an issue later on, however, even when modified to be $Attr_sAMAaccountName i still get errors.
    #Connect to Active Directory
    Import-Module ActiveDirectory
    # Import iNOW user information
    $Users = import-csv D:\ADUpdate\Data\INOW_export.csv
    #Check to see if the account already exists in AD
    ForEach ( $user in $users )
    #Assign the content to variables
    $Attr_employeeID = $users."Student Number"
    $Attr_givenName = $users."First Name"
    $Attr_middleName = $users."Middle Name"
    $Attr_sn = $users."Last Name"
    $Attr_postaldeliveryOfficeName = $users.School
    $Attr_company = $users."School Number"
    $Attr_department = $users."Grade Level"
    $Attr_sAMAccountName = $Attr_givenName.Substring(0,1) + $Attr_middleName.Substring(0,1) + $Attr_sn
    IF (Get-ADUser $Attr_sAMAccountName)
    {Write-Host $Attr_sAMAccountName already exists in Active Directory
    PS C:\Windows\system32> D:\ADUpdate\Scripts\INOW-AD.ps1
    Get-ADUser : Cannot convert 'System.Object[]' to the type 'Microsoft.ActiveDirectory.Management.ADUser'
    required by parameter 'Identity'. Specified method is not supported.
    At D:\ADUpdate\Scripts\INOW-AD.ps1:28 char:28
    + IF (Get-ADUser $Attr_sAMAccountName)
    + ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-ADUser], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.ActiveDirectory.Management.Commands.GetAD
    User

  • Import-CSV and Takeown.

    I'm currently trying to come up with a way to search an entire folder directory to find all objects that a particular user is owner to, export that list to csv, then import that csv and using takeown to grant local Administrators Owner.
    Scouring the internet, I've been able to come up with this Powershell script to scan a directory and export the findings to a csv.
    param(
    [string]$username = "NameofUserSearchingFor",
    [string]$logfile
    Set-ExecutionPolicy Unrestricted
    if ($logfile -eq "") {
    $logfile = "c:\" + $username + "-Owner.csv"
    Write-Host "Setting log file to $logfile"
    #Path to search in
    [String]$path = "c:\TestFolder"
    [String]$AD_username = "Domain\" + $username
    #check that we have a valid AD user
    if (!(Get-ADUser $AD_username)){
    Write-Host "ERROR: Not a valid AD User: $AD_username"
    Exit 0
    Write-Output "$username" | Out-File -FilePath $logfile
    $files = Get-ChildItem $path -Recurse
    ForEach ($file in $files)
    $f = Get-Acl $file.FullName
    if ($f.Owner -eq $AD_username)
    Write-Output $file.FullName | Out-File -FilePath $logfile -Append
    exit 0
    That script exports data in the form of:
    NameofUserSearchingFor
    C:\TestFolder\TestFolder1
    C:\TestFolder\TestFolder2
    C:\TestFolder\TestFolder1\test1.txt
    C:\TestFolder\TestFolder2\test2.txt
    I'd like to use takeown to read each line of text and take ownership for local Administrators.  
    The script i'm trying to use doesn't do anything though.
    #Local Admininstrator Take Ownership
    $rows = Import-Csv "c:\NameofUserSearchingFor-Owner.csv"
    ForEach ($row in $rows)
    takeown /A /F $row
    Perhaps I'm going about this all wrong.  I'm relatively new to Powershell and have been trying to come up with a way to do this for the past 3 days.
    Any assistance would be greatly appreciated!
    *Update*
    If I reconfigure the takeown portion a bit to this:
    #Local Admininstrator Take Ownership
    $Path = "c:\NameofUserSearchingFor-Owner.csv"
    $rows = Import-Csv $Path
    ForEach ($line in $rows)
    takeown /A /F $Path
    The result is:
    SUCCESS: The file (or folder): "c:\NameofUserSearchingFor-Owner.csv" now owned by the administrators group.
    But will repeat as many times as there are lines of text in the csv.  So if there are 4 lines of text in the csv, that line will repeat 4 times.  I find it interesting that it knows how many lines there are but instead of granting local Administrator
    the owner to the path specified in the line it will instead grant local Administrator to the csv file.

    That is because you are takingownership of the CSV.
    ForEach ($line
    in$rows){
        takeown /A
    /F $Path
    should be:
    ForEach ($line
    in$rows){
        takeown /A
    /F $line
    ¯\_(ツ)_/¯

  • Import csv rename user account is exists in AD

    ok, got an interesting one here. Might be easy i have no idea where to even begin with this one.
    If have a web site that generates csv file to import into AD. No problem, works great.
    I need to put in a check to see if the user/email account already exists in AD and if they do, append a 1 to the account.
    then i want to check that appended account with the 1 to see if that exists, if it does add a 2 and so on until the account doesnt exist, then bam create it.
    Has anyone done anything like this before ? Or can someone possibly point me in the right direction as far as coding would go.
    I'm kind of a novice but diving in head first here.
    Any help is appreciated
    Thanks All 

    here's what i got thus far. i haven't tested as of yet. looking for feedback first.
    Import-Module ActiveDirectory
    $files = Get-ChildItem -Path c:\new_users\*.csv
    Foreach ($file in $files) {
    Foreach ($user in(import-csv $file)) {
    $username=$user.SamAccountName
    $UserPrincipalName = $username + '@my-domain.COM'
    $password='xxxxxxxxxx'
    Foreach ($user in $files)
     ##Check if exist##
      $User = Get-ADUser -Filter {SamAccountName -eq $Entry}
      If ($User -eq $null) {
         New-ADUser -SamAccountName $user.SamAccountName -UserPrincipalName $UserPrincipalName -name $user.DisplayName -GivenName $user.GivenName -Initials $user.Initials -SurName $user.SurName -DisplayName $user.DisplayName -OfficePhone $user.OfficePhone
    -EmailAddress $user.EmailAddress -Title $user.Title -Department $user.Department -Company $user.Company -profilePath $user.ScriptPath
      Else
      $Count = "0"
      While ($User -ne $null)                                                                          
        $Count ++                                                                                          
        [String]$Entry = $Entry.Substring(0,$string.Lenghth-1) + $Count                                                                                                                                                                                      
        $User = Get-ADUser -Filter {SamAccountName -eq $Entry}                                                                                                                                                                                    
      If ($User -eq $null)                                                                                                         
        New-ADUser -SamAccountName $user.SamAccountName -UserPrincipalName $UserPrincipalName -name $user.DisplayName -GivenName $user.GivenName -Initials $user.Initials -SurName $user.SurName -DisplayName $user.DisplayName -OfficePhone $user.OfficePhone
    -EmailAddress $user.EmailAddress -Title $user.Title -Department $user.Department -Company $user.Company -profilePath $user.ScriptPath

  • Import-csv and New-ADUser issue

    Hi there,
    I am fairly new to PS (and this site) and I don't understand what I am doing wrong. (I changed some domain settings where applicable to not the reflect the real-world scenario, just an example)
    CSV content:
    Firstname,Lastname,Maildomain,SAM,OU,Password,Description
    User,Test01,contoso.com,utest01,OU=Standard Users,OU=Users,DC=domain,DC=loc,P@ssw0rd,Test User
    PS script:
    $Users = Import-Csv -Delimiter "," -Path "C:\Userlist-sn.csv"
    foreach ($User in $Users)
    $Displayname = $User.Firstname + " " + $User.Lastname
    $UserFirstname = $User.Firstname
    $UserLastname = $User.Lastname
    $OU = "$User.OU"
    $SAM = $User.SAM
    $UPN = $User.Firstname + "." + $User.Lastname + "@" + $User.Maildomain
    $Description = $User.Description
    $Password = $User.Password
    New-ADUser -Name "$Displayname" -DisplayName "$Displayname" -SamAccountName $SAM -UserPrincipalName $UPN -GivenName "$UserFirstname" -Surname "$UserLastname" -Description "$Description" -AccountPassword (ConvertTo-SecureString $Password -AsPlainText -Force) -Enabled $true -Path "$OU" -ChangePasswordAtLogon $false –PasswordNeverExpires $true -server domain.loc
    I am getting the following error:
    New-ADUser : The object name has bad syntax
    At C:\Windows\System32\WindowsPowerShell\v1.0\import-test.ps1:12 char:15
    + New-ADUser <<<< -Name "$Displayname" -DisplayName "$Displayname" -SamAccountName $SAM -UserPrincipalName $UPN -GivenName "$UserFirstname" -Surname "$UserLastname" -Description "$Description" -AccountPassword (ConvertTo-SecureString $Password -AsPlainText -Force) -Enabled $true -Path "$OU" -ChangePasswordAtLogon $false –PasswordNeverExpires $true -server domain.loc
    + CategoryInfo : NotSpecified: (CN=User Test01...t Test User}.OU:String) [New-ADUser], ADException
    + FullyQualifiedErrorId : The object name has bad syntax,Microsoft.ActiveDirectory.Management.Commands.NewADUser
    Now that I am writing this question it kind of dawned on me whether or not the problem is with the csv, as delimiter is "," and the OU value has commas in it and it destroys syntax. If this is so then my question would be, how to save the input
    so the values are retained correctly? Is the New-ADUser command itself ok?
    Thank you all.

    Hi,
    Now that I am writing this question it kind of dawned on me whether or not the problem is with the csv, as delimiter is "," and the OU value has commas in it and it destroys syntax.
    Are the OUs quoted inside of the CSV? If so, the commas inside should be fine.
    Here's an easy test to see if your problem is with the input:
    Quoted OU path:
    PS C:\Scripts\PowerShell Scripts\Misc Testing\5-21-2014> Import-Csv .\Userlist-sn.csv
    Firstname : User
    Lastname : Test01
    Maildomain : contoso.com
    SAM : utest01
    OU : OU=Standard Users,OU=Users,DC=domain,DC=loc
    Password : P@ssw0rd
    Description : Test User
    Unquoted OU Path:
    PS C:\Scripts\PowerShell Scripts\Misc Testing\5-21-2014> Import-Csv .\Userlist-sn2.csv
    Firstname : User
    Lastname : Test01
    Maildomain : contoso.com
    SAM : utest01
    OU : OU=Standard Users
    Password : OU=Users
    Description : DC=domain
    Don't retire TechNet! -
    (Don't give up yet - 12,830+ strong and growing)

  • How to validate and import csv file to mysql? (Concurrent update)

    Hi
    I have a csv file with various columns of data which need to be validated and display in a jsp page. After the validation, the data needs to be imported into mysql DB.
    May I ask how can I retrieve those data, validate them and import them row by row to DB?
    Also, the program needs to handle concurrent update of DB. i.e. user A can import data through jsp page while user B can upload the csv file to insert into table.
    Thanks

    techissue2008 wrote:
    May I ask how can I retrieve those dataGoogle on "jsp file upload". I highly recommend you the Apache Commons FileUpload API.
    validate them Just write Java logic accordingly. You may find the java.lang.String API useful.
    and import them row by row to DB? You can use the JDBC API for this. There is a JDBC tutorial here at Sun.com. Google can find it.
    Also, the program needs to handle concurrent update of DB. i.e. user A can import data through jsp page while user B can upload the csv file to insert into table. Just write threadsafe code.

  • Migration Assistant and user permissions broken

    I just used Migration Assistant to my old early 2008 unibody 15" MBP to import stuff to my brand new 15" quad core i7. The old machine was connected through FW800 in target disk mode.
    Somehow this process failed and it left me to an odd result which I cannot figure out how or why such things would happen. I have used migration assistant often successfully, if not exactly this way.
    I already decided to start things from scratch, but I would appreciate any insight that somebody might have. Like what just happened? Do you have similar experiences?
    The process:
    - In my old machine I had two users, for the sake of argument, "MainUser" and "OldUser".
    - In my new machine I had two users made right after a clean install, "Admin" and "MainUser". I usually work with "MainUser" so I made one without thinking about it much.
    - I connected the old machine in Target Disk mode and started Migration Assistant under Admin of the new machine. First question I answered to migrate from another disk, as the other machine was in Target Disk mode. Next one asked to pick the disk and that is followed by a selection "What to migrate". I wanted to install applications from scratch, so I checked everything except applications. I do not know if this is relevant, but I would imagine it is not.
    - A pop-up appeared, which correctly told that there already is MainUser on the new machine. The dialog gave me three options: 1. Rename the account that I am transferring, two with the same name could not exist 2. Replace the existing account with the one I am transferring 3. Do not transfer this account.
    - I chose 2, because there was nothing worth saving in the MainUser account on the new machine. Continue.
    - Watch a few hours of progress bar
    - After the migration process the machine was in very odd state. I logged in as MainUser and it oddly looked like default Snow Leopard state, not like the desktop of the migrated account. No folder items that I had on the desktop previously were visible, language was default English and desktop background was the Snow Leopard nebula. I tried, but could not change that in the system preferences.
    - Closer inspection revealed that I did not have permissions to access any of the folders under my username, like Documents, Music, Movies etc. This also explained the desktop problems. It meant that none of the programs were allowed to read or write any data under Library folder so everything was and stayed as default. For instance, any settings that I tried to change and which might even apparently change, would reset back on logout. Programs settings were empty, like no bookmarks on Safari or Apple Mail did not show the mail accounts.
    - I checked with Terminal what was on with permissions, and for some odd reason, all the folder owners under MainUser belonged to OldUser(!).
    - There is no reason that I can think of why that user account would have anything to do with this migration -- after all, the whole deal was supposed to be to migrate (or overwrite) MainUser, not to mess with OldUser in any way, except bring that over as a separate item.
    - For the sake of argument, I also logged to OldUser account and that seemed to be transferred correctly. No issues with file permissions or the desktop. Only MainUser was messed.
    - I decided to take the ownership of all files under MainUser account back. I did "sudo chmod -R MainUser *" to grab everything. Immediately the stuff on desktop appeared. After logout and login rest of things seemed to return (mostly) to those places that the migrated MainUser should have had, like the desktop background, dock position and even Apple Mail now showed my old emails.
    Even if I sort of fixed things, I have iffy feeling about the whole process.
    I decided to start over. This time I will not have MainUser account on the new machine to avoid any further hassle. While I suggest everyone to avoid this situation and not to have users with same name or let Migration Assistant to run this overwrite -option, I would like to hear any speculation why or how this might have happened.
    If Apple is listening, you might check the latest Migration Assistant in the above case. There might be a bug. Thank you for listening.

    I think it is inadvisable to have the same user account on the target machine when using Migration Assistant - just from recollection this is known to cause problems.
    However, in my experience (and I have used MA many times across many machines), even when apparently completing successfully, MA simply does not work properly when it comes to permissions.
    For example, after using MA to import my previous user account to my new MBP 2.3 i7, I cannot drag anything out of the dock - it just doesn't work.
    Also, content of my desktop folder does NOT display on the desktop itself.
    I have tried applying specific permissions to this folder, for my user account AND "Everyone" - it makes no difference.
    I do not regard Migration Assistant as fit for purpose.

  • Export/import login server and user grup security

    Hi,
    I followed the instructions to export Login server, user group
    security using the ssoexp.csh, secexp.csh. Then I imported the
    login server, and user group security using the ssoimp.csh,
    secimp.csh .
    I then logged into Portal and check the users, all the users are
    imported properly. However, I didn't see any group that are
    supposed to be imported. Do I missing anything?
    The syntax to run the secimp is as follows:
    secimp.csh -s portal30 -p portal30 -o portal30 -m reuse -d
    sec.dmp -c target_database
    The import finished w/o error. How can I see the groups in the
    new portal instance that I tried to import objects in?
    I noticed that the wwsec_group$ in the source area is over 3000,
    and in the target the count is only 10, which is the number of
    group I have before the import. But during the export, I don't
    see the wwsec_group$ table being exported, is that the problem?
    P.S. versions are: 9iAS 1.0.2, portal version 3.0.9.8 on solaris.
    Thanks;
    Kelly.

    This question is best suited to the Oracle9iAS SSO and Portal Security forum.
    Thanks

  • Letter of credit in import - customization and user steps

    Hi
    we want to use foreign trade module to track letter of credit in import. we want to track LC status with limits and validity dates.
    but in cockpit (ENLO) we are not getting vendor selection. it is only customer selection available.
    please let us know how we can create LC document in ENLO for vendor. if anybody has configuration step and user manual please revert.
    Thanks & Regards

    sap has confirm that this functionality is not available for import hence not possible in sap.

  • Importing CSV file and parsing it

    First of all I am very new to writing powershell code.  Therefore, my question could be very rudimentary, but I cannot find an answer, so please help.
    I'm trying to read a CSV file and parse it.  I cannot figure out how to access nth element without hardcoding its name.
    $data = Import-Csv $file   #import CSV file
    # read column headers (manually read the first row of the data file, or import it from other source, or ...)
    $file_dump = Get-Content $file  #OK, I'm sure there is another way to get just the first line, but that's not relevant
    $name_list = $file_dump[0].split(",")
    # access element
    $temp = $data[$i].Name  # works - but that's HARDCODING the column name into the script - what if someone changes it?
    #but what I want to do is
    $temp = $data[$i].$name_list[0]
    How do I do this in PowerShell?

    So you're asking how to get the first data point from the first column, no matter what the header is?
    Why won't you know what your input file looks like?
    You can always drop the first line of the file to remove the existing headers and then use the -Header parameter of Import-Csv to give yourself known headers to reference (this will only work if you know how many columns to expect, etc etc etc).
    http://ss64.com/ps/import-csv.html
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Import-csv and export-csv

     Hi everyone,
    How do I modify the script so that I see all the entries in the computers_result.csv file.  As it stands only the last entry in the computers.csv shoes up in the computers_result.csv file.  Thanks so much.
    Import-Csv C:\computers.csv | ForEach-Object {
    $computername = $_.computer
    $result = get-adcomputer $computername -Properties description  | select Name,Description
    $result | export-csv C:\computers_result.csv

    Try this and let me know
    $result = @()
    Import-Csv C:\computers.csv | ForEach-Object {
    $computername = $_.computer
    $result += get-adcomputer $computername -Properties description | select Name,Description
    $result | export-csv C:\computers_result.csv
    Regards Chen V [MCTS SharePoint 2010]

  • Is it possible to export and import the roles and users tables?

    Hi,
    is there any possibility to export and import the role and user definitions?
    We have a SAP MDM repository with a lot of roles and users and also with a lot of changes.
    And now I'm searching for a fast and efficient way of managing the roles and users.
    Thanks and Regards, Melanie

    Hi Melanie,
    There is no export/import functionality for roles and users.  The only way to manage these in an automated way would be to write a program that uses the Java or ABAP APIs.  Both APIs expose functionality to create, update and delete roles and users.
    Hope this helps,
    Richard

  • Office 365 Shared External Contacts - how do I delegate Edit and Update permissions to users

    Hello
    Office 365 Shared External Contacts - how do I delegate Create/Update/Delete/Edit permissions to users who are not Admins? These Contacts are in the Global Address List. Not Outlook personal Contacts. O365 Small Business Premium

    Hi,
    To grant users delegate permissions, open Outlook, go to FILE -> Info -> Account Settings -> Delegate Access -> Add -> Search and add the user, click OK -> Edit the permission of the user. We can set different permissions in the dropbox
    of Contacts.
    There are four permisssions for Contacts:
    1. None
    2. Reviewer (can read items)
    3. Author (can read and create items)
    4. Editor (can read, create, and modify items)
    Select the permission that you want to grant the user.
    We can also modify the permission later in this section.
    I hope the information is helpful, if I misunderstood anything, feel free to correct me and provide more detailed description of the question.
    Regards,
    Melon Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

Maybe you are looking for

  • Can I migrate info between Macbook Pro and Mac mini using a thunderbolt connection?

    I want to migrate information from my Macbook Pro to my MacMini but the Macbook Pro doesn't see/recognise the MacMini. The MacMini sees the Macbook Pro. The MacMini is using OS X Yosemite version 10.10.1 The Macbook Pro is using OS X version 10.9.5 I

  • How to make a flat object look round?

    I have a round logo for a company. I want to make it look like it is painted on to a christmas tree ornament.. so it almost needs to look 3D. Can I do this in photoshop or illustrator or something? Any thoughts?

  • Considering switching to Firefox - help!

    Whilst I do love Safari (over Explorer) I am interested in trying Firefox as everybody keeps on about how good it is! I've had a basic look and it seems fairly similar (although i like the ability to add email alert links on the brower etc and a few

  • How to I get the FTP details for my published website?

    My web developer needs remote access to my published iWeb website. Since the logoin details are built-in, how do I find them to pass them on? Many thanks!

  • Scale Factor for Photoshop and Firefox

    Hi everyone, I am attempting to adjust the scale factor on my macbook pro. Everything is good so far except several applications (firefox and cs5 photoshop) do not readjust well. I am wanting to set the independent scale factor of these applications