Import Documents via Powershell from CSV

Hey guys,
I have a CSV, managing metadata of documents, with following columns:
WEB, DocLib, DocPath
DocPath is the file location of the corresponding documents. Web+DocLib the target destination on Sharepoint. 
How can I import these documents to the correct destination, using powershell.

Hi,    
According to your description, there is a .csv file which stores the destination path and the source path of files, you want to use PowerShell to read the values of this .csv file, then upload files from their source path to the
destination path which points to a SharePoint Document Library.
Here is a solution like this: Retrieve the values of columns in this .csv file, then upload files to the specific location according the values we got.
Here are two links about how to read csv file using PowerShell:
http://itrob.be/sharepoint-powershell-script-to-import-csv-data-into-a-list/
http://malcolm1215.wordpress.com/2013/03/11/powershell-how-to-read-csv-files/
A blog from TechNet about SharePoint 2010: Upload File in Document Library Using PowerShell:
http://social.technet.microsoft.com/wiki/contents/articles/19529.sharepoint-2010-upload-file-in-document-library-using-powershell.aspx
Best regards
Patrick Liang
TechNet Community Support

Similar Messages

  • Importing users into WGM from csv file issues/crash

    Hi,
    i've been importing user information from csv files into WGM via the +server >  import+ function .
    It worked the first few times but now when i try the import progress bar pops up and promptly disappears without any thing importing.
    i've tried restarts, new admin account, reinstalled  WGM.
    I've also trashed some pref but i don't really know which ones i should be losing.
    The servers an OD master.
    any help would be appreciated.
    as a last resort what do i need to backup/save if i were to format/reinstall osx server? keeping my settings etc.....
    thanks
    paul

    What I did was:
    Exported the user list, to create an XML file in the correct format.
    Using this format, I created a spreadsheet in Excel (sorry Apple), and in the final column I created a field that concatenated the information I wanted in the ':' deliminated format of the previously export XML.
    Then just copy and past via pico into a pure text file and imported that.
    You have to be careful with comments in Passenger, using special characters (';!@#$%^ and others can cause the WGM to fail and crash.

  • Add Multiple Domains as an External Relay via powershell from a list

    Hello, 
    I have a requirement to add a few hundred external domains as a relay and would like to accomplish this via powershell. I'm familiar with the command to submit 1 at a time but would like to have it read them all in from a list if possible. Any help would
    be great! 
    Thank you, 
    Eric 

    Hello Eric,
    Just replied similar question in a thread, you can refer to that...
    http://social.technet.microsoft.com/Forums/exchange/en-US/b84cd2e7-5fb3-4a1d-9bcc-41acdb7142a2/adding-multiple-accepted-domains-with-importcsv?forum=exchangesvrdeploy

  • Create local user via dropdown from .csv

    Hello
    i try to create a powershell script to create local users on Win7.
    All the user informations are stored in a .csv file.
    Now I'd like to have a dropdown-menu to choose which user should be created.
    So i want the first column of the csv displayed in the Dropdown.
    When a option gets choosen the script should read the rest of the information out of the .csv-file and create the user with it.
    i got some parts to create a dropdown and to create local users via .csv, but my limited powershell knowledge keeps me from putting it to one piece.

    Hi Yannick Hassler,
    To create local users with properties listed in a csv file, and also add the users to a local group, please refer to the script below:
    import-csv d:\3.csv | foreach{
    $server=[adsi]"WinNT://$env:computername"
    $user=$server.Create("User",$_.name)
    $user.SetPassword($_.password)
    $user.SetInfo()
    # add extra info
    $user.Put('Description',$_.description)
    $user.SetInfo()
    # add user to mandatory local group
    $group = $_.group
    $group=[adsi]"WinNT://$env:computername/$group"
    $group.Add($user.path)
    # add users to other groups
    Please also save your .csv file d:\3.csv like this :
    Name
    password
    group
    description
    TUTTLSX
    Password
    Users
    Test user
    annaretu
    Password
    Users
    Test user11
    I hope this helps.

  • Remove-Mailboxes using Powershell from CSV file

    hello all ,
    I encountered in problem with my exchange Server 2010
    I have a mission to delete closed 150 Mailboxes in my organization
    I tried a lot times to use the command "Remove-mailbox " and i anytime got error
    I would appreciate the help of one of you maybe guide me because is very important for me to resolve this problem
    so meantime i did export of mailbox from exchange server with content "Userpricplename" to CSV file after than export does success i did filtering and tried to perform this commad :" import-csv c:\Mailboxes.csv | foreach {Remove-Mailbox -userprincipalname
    $_.Emailadress }
    please see the errors below :
    excel content :
    website: www.PelegIT.co.il

    Hi ,
    If we set -Confirm:$false EMS will not prompt for yes or no option while executing commands in shell.
    If we set -Confirm:$true EMS will prompt for yes or no option while executing commands in shell.
    Thanks & Regards S.Nithyanandham

  • Import CVS via powershell Error - Member Already present

    Hello,
    I've been trying to import some CVS file into exchange with the powershell management console.  I've created a script to import the CVS files below and to ignor the duplicate items:
    Import-Csv .\Contacts.csv|
    foreach-object {if (Get-MailContact -anr $_.displayname) {write-host $_.displayname 'is a duplicate entry'}
    else {New-MailContact -Displayname $_.DisplayName -ExternalEmailAddress $_.EmailAddress -OrganizationalUnit “Contacts” -Alias $_.Alias}
    However when I enter the command i just get the following message:
    Import-Csv : The member "Dale and Valley Homes" is already present.
    At C:\contactimport.ps1:1 char:11
    + Import-Csv <<<< .\Contacts.csv|
    + CategoryInfo : NotSpecified: (:) [Import-Csv], ExtendedTypeSystemException
    + FullyQualifiedErrorId : AlreadyPresentPSMemberInfoInternalCollectionAdd,Microsoft.PowerShell.Commands.ImportCsvC
    ommand
    I've been looking all over the forums and haven't found a solution to my problem. Any help would be appreciated.
    Thanks.

    please adjust your cdv with headers and provide them in the import-csv Command
    Import-Csv $outFile -Header A,B,C
    Seidl Michael | http://www.techguy.at |
    twitter.com/techguyat | facebook.com/techguyat

  • N8: Import and sync calendar from csv/ics

    Hi!
    Is it possible to import calendar entries from an csv (Outlook) or iCal (1.0 or 2.0)? Is it possible to specify the URL from the correspondent file? I don't want to sync manually and the file changes normally once or twice a week.
    Background: My university offers my personal schedule as a download in the formats: HTML, CSV, CSV (Outlook), iCal 1.0, iCal 2.0. It is possible to sync this on iOs without problems and on Android with a workaround as Google has problems with password saved (.htaccess) URLs. How can i do this on Symbian Belle?

    Hi!
    I have the same problem on my university. There is a way to sync google calendar with Symbian Belle by using active sycn mailbox. But today I have problems with importing ical from my university to google calendar. It will be very usefull to make some application to import task from file or url adres to phone calendar.

  • How can i attach and send a document via email from my iphone?

    I could not find an option to attach a document from my iphone as i have lot of official responsibilities it's very difficult sent such mails.

    To remove your facebook contacts go to SETTINGS / FACEBOOK and toggle off CONTACTS.

  • Sync Pages documents via iCloud from and back to iPad/MacBookPro

    Having just updated to Lion on my MacBook Pro and got an iPad2 with iOS 5 I have now managed to get some of my Pages documents from MBP to iPad by uploading them to the www.icloud.com site.
    I've made some changes to the documents on my iPad2.  These changes show on the www.icloud.com page. But my question is how do the changes sync back to the original document on my MBP?  Do I have to download them fom the www.icloud.com page?  I thought they were supposed to just sync automatically.  I tried downloading one of the changed docs to my MBP but it doesn't update the original but creates a new one (I think?!)
    Help, I'm confused now !

    Documents in iCloud.com don't sync to your MPB. They only sync between iOS devices.  As you suggest, you have to download the document from iCloud.com to your MBP and re-upload if you make changes.
    Messy, but that's the way it is at the momnet.

  • Import Video via USB from Sony Handycam HDD

    Just purchased Final Cut Express, eager to get to my first project. Plugged in my camera the only way possible (mini usb), my mac mini recognized the camera and I navigated using the import menu.
    Finding the *.mpg files that are on my camera's hard drive I selected the ones I wanted and "chose". An error message appeared telling me that these *files were unrecognizable*.
    Investigating, I found I could not open them in quicktime player - but could view them just fine using my favorite 3rd party player VLC.
    I did a bit of google'ing to find I'm screwed. My research tells me that my camera writes them in a "multiplexed" encoding, which Quicktime can't read even though it's mpeg. One solution that was offered is to loop it through a composite dongle and rerecord all of my footage in real time - but that's not an option for me.
    *How can I get my Sony Handicam HDD camera to import into FCE? Is their some free conversion software or drivers?*
    Thanks,
    Mitch

    More frustration. I finished batching my footage for my project, and just as I lay the first scenes on the timeline and tell it to playback, I get this nasty "Unrendered" message in the player. I didn't add any effects or mess with settings, they're the same clips they just previewed for me - but now they're on the timeline where I need to work on them.
    I remember reading that FCE's big feature was the whole "Real Time" feature, so I messed with the RT tab to find that it works, kind of, if I kick it into manual mode and cut my frame rate in half. Anything more and it gives me an error message that tells me I need to increase my compression or else switch back to Safe RT. *What and how do I increase compression?*
    So is my Mac Mini doomed to be at 50% frames due to the lack of power? *Is it the processing speed, ram, or video card (or all) that's holding me back?*
    Mitch

  • Looking for a way to install Windows Intune via powershell

    I'm very new to Powershell and completely lost on how to do this.
    Looking for a way to install Windows Intune via powershell from a self extracting zip file I will send to remote users. This will also need to run Corp admin level privileges to install.
    Thank you in advance for your help.

    Hi Mtirado,
    For Windows Intune issue, I recommemd you can post in dedicated forum for more effective support:
    https://social.technet.microsoft.com/Forums/en-US/home?category=windowsintune
    If you get the initial Powershell script, and the script encounter error or problem, you can post back with current script and issue.
    Thanks for your understanding.
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna Wang
    TechNet Community Support

  • Import computers from csv Powershell

    Hi,
    I'm trying to import some computers within sccm via Powershell but get the following error:
    PS STC:\> $Computers = Import-Csv "C:\computers.csv"
    $CollectionName = "STC - W7 - Deploy"
    ForEach ($Workstation in $Computers)
       Import-CMComputerInformation -ComputerName $Workstation.Name -MacAddress $Workstation.Mac -CollectionName $CollectionName
    Import-CMComputerInformation : Cannot validate argument on parameter 'MacAddress'. System.Management.Automation.ValidationMetadataException
    At line:5 char:77
    + ...  -ComputerName $Workstation.Name -MacAddress $Workstation.Mac -Collec ...
    Csv contains:
    Name,Mac
    Computer1,0C:51:8F:7E:3D:04
    Please advise.
    J.
    Jan Hoedt

    That does work but it only imports 1 computer (the last in my list).
    Import-CMComputerInformation -CollectionName "All Systems" -FileName "c:\computers2.csv" -EnableColumnHeadings $True -verbose
    csv
    Name,Mac Address
    test123,00:11:22:33:44:55
    test3456,00:11:22:33:44:55
    test75689,00:11:22:33:44:55
    test899,00:11:22:33:44:55
    test756689,00:11:22:33:44:55
    Only test756689 is imported.
    This is the verbose output:
    VERBOSE: Start: Execution of WQL query: SELECT * FROM SMS_Collection WHERE CollectionType = 2 AND Name='All Systems' ORDER by Name
    VERBOSE: Query options: None
    VERBOSE: Performing the operation "Import" on target "ComputerInformation: c:\computers2.csv".
    VERBOSE: Executing method 'ImportMachineEntry' against class 'SMS_Site'
    VERBOSE: Input properties:
    VERBOSE: -- :: NetBiosName == test123
    VERBOSE: -- :: SMBIOSGUID ==
    VERBOSE: -- :: MACAddress == 00:11:22:33:44:55
    VERBOSE: -- :: OverwriteExistingRecord == True
    VERBOSE: Output properties:
    VERBOSE: -- :: MachineExists == True
    VERBOSE: -- :: ResourceID == 16791724
    VERBOSE: -- :: ReturnValue == 0
    VERBOSE: -- :: SMSUniqueIdentifier == GUID:D86BB77F-4F29-4DFA-B8A1-874783E55FC0
    VERBOSE: Executing method 'ImportMachineEntry' against class 'SMS_Site'
    VERBOSE: Input properties:
    VERBOSE: -- :: NetBiosName == test3456
    VERBOSE: -- :: SMBIOSGUID ==
    VERBOSE: -- :: MACAddress == 00:11:22:33:44:55
    VERBOSE: -- :: OverwriteExistingRecord == True
    VERBOSE: Output properties:
    VERBOSE: -- :: MachineExists == True
    VERBOSE: -- :: ResourceID == 16791724
    VERBOSE: -- :: ReturnValue == 0
    VERBOSE: -- :: SMSUniqueIdentifier == GUID:D86BB77F-4F29-4DFA-B8A1-874783E55FC0
    VERBOSE: Executing method 'ImportMachineEntry' against class 'SMS_Site'
    VERBOSE: Input properties:
    VERBOSE: -- :: NetBiosName == test75689
    VERBOSE: -- :: SMBIOSGUID ==
    VERBOSE: -- :: MACAddress == 00:11:22:33:44:55
    VERBOSE: -- :: OverwriteExistingRecord == True
    VERBOSE: Output properties:
    VERBOSE: -- :: MachineExists == True
    VERBOSE: -- :: ResourceID == 16791724
    VERBOSE: -- :: ReturnValue == 0
    VERBOSE: -- :: SMSUniqueIdentifier == GUID:D86BB77F-4F29-4DFA-B8A1-874783E55FC0
    VERBOSE: Executing method 'ImportMachineEntry' against class 'SMS_Site'
    VERBOSE: Input properties:
    VERBOSE: -- :: NetBiosName == test899
    VERBOSE: -- :: SMBIOSGUID ==
    VERBOSE: -- :: MACAddress == 00:11:22:33:44:55
    VERBOSE: -- :: OverwriteExistingRecord == True
    VERBOSE: Output properties:
    VERBOSE: -- :: MachineExists == True
    VERBOSE: -- :: ResourceID == 16791724
    VERBOSE: -- :: ReturnValue == 0
    VERBOSE: -- :: SMSUniqueIdentifier == GUID:D86BB77F-4F29-4DFA-B8A1-874783E55FC0
    VERBOSE: Executing method 'ImportMachineEntry' against class 'SMS_Site'
    VERBOSE: Input properties:
    VERBOSE: -- :: NetBiosName == test756689
    VERBOSE: -- :: SMBIOSGUID ==
    VERBOSE: -- :: MACAddress == 00:11:22:33:44:55
    VERBOSE: -- :: OverwriteExistingRecord == True
    VERBOSE: Output properties:
    VERBOSE: -- :: MachineExists == True
    VERBOSE: -- :: ResourceID == 16791724
    VERBOSE: -- :: ReturnValue == 0
    VERBOSE: -- :: SMSUniqueIdentifier == GUID:D86BB77F-4F29-4DFA-B8A1-874783E55FC0
    Jan Hoedt

  • Import Comments data and Dimension Members from csv file via Data Manager

    Dear Experts,
    I have two questions regarding the data manager.
    Q1.Is it possible to import "Comments" from the csv file via Data Manager?
    We'd like to import the amount with "Comments".
    My image of csv file is like below;
    ACCOUNT,CATEGORY,TIME,ENTITY,INPUTCURRENCY,AMOUNT,COMMENTS
    1100000,ACTUAL,2010/06,LC,30000,This is comment
    Q2.Is it possible to import the dimension "members" from the csv file via Data Manager?
    We have a user-defined dimension named "Project"
    and would like to import the members, instead of maintaining them in BPC administration manually.
    I found an online help information which says "Import Master Data from a Data File Example",
    but I could not find any relevant sample package for this.
    (I tried to import the members by using "Import" package, but it failed...)
    reference:http://help.sap.com/saphelp_bpc75/helpdata/en/86/8b1bfc12c94fb0b585cca70d6f1b61/content.htm
    Thanks in advance for your help.
    Fumi

    Hi Fumi,
    In this case, I would suggest you to create a customized SSIS package which will fill-in the "Comment<APP>" table, according to the csv file you have. I do not know any standard package that allows you to import comment the way you would like...
    Best Regards,
    Patrick

  • Import Files to SharePoint library via Powershell

    Hi,
    I'm a newbie to programming and I appreciate anybody who can help me out.
    I need to be able to import files from a shared folder to a SharePoint document library on a scheduled basis. I prefer to do this via Powershell. 
    Here are the requirements:
    1. Shared Folder is "D:\For_Upload". There's only one folder where all files for upload will be dumped. There are no subfolders.
    2. The SharePoint Document library named "Invoice" is where the files will be uploaded. This library contains a list of folders pertaining to Invoice numbers (e.g. 5200004720, 5200004721, 5200004722, and so on.). 
    3. The documents to be uploaded will have a filename containing the Invoice number and year. The uploaded document should be dumped to a folder with its corresponding invoice number and year in the document library. If no year is specified in the filename
    then it should automatically use the current year.
    4. If the said document filename does not correspond to any invoice number in the document library folders, the document will be dumped to another shared folder labeled "D:\Not_Uploaded"
    I appreciate anybody who can assist me with this.
    Regards,
    Terri

    try these links:
    http://stackoverflow.com/questions/22411014/sharepoint-script-to-automatically-import-documents-from-a-network-share-on-a-r
    https://spfolderimport.codeplex.com/
    https://camerondwyer.wordpress.com/2014/06/04/how-to-bulk-uploadcopy-a-folder-structure-and-files-to-sharepoint/

  • Remove various accepted domains (exchange 2007) from a list file via powershell

    hello!
    i'm a newbie with powershell and i'm trying to find if is it possible to remove a lot of exchange 2007 accepted domains from a csv file using powershell.
    I want to delete accepted domains contained in a csv, it has only domains name and powershell requires the name , that is different from the domain.
    example of accepted domain in my organization:
    Name                           DomainName                DomainType            Default
    Domain0001        
    domain1.com     Authoritative         False 
    Domain0002 hello1.com
    Authoritative False
    I've only a csv with domains name:
    domain.csv:
    Domain
    domain1.com
    hello1.com
    Deleting an accepted domain via powershell requires the name so I need to extract first the name of , i've tried with this command and it works:
    Get-AcceptedDomain | Where{$_.DomainName -eq 'domain1.com'}
    This works only for 1 domain, I've a lot of domains to delete so it's inviable
    Now, i'm trying to launch this command without success:
    import-csv domain.csv | foreach {Get-AcceptedDomain | Where{$_.DomainName -eq '$_.Domain'}}
    Probably there is a syntax error, or maybe I just can't do it. 
    Any help? 
    Many thanks in advance!!

    Don't know what to tell you, then.  If I create a test file with that data, the Import-CSV works for me:
    Domain
    3414257440.domain.com
    domain1.domain.com
    '@ | set-content c:\testfiles\domain.csv
    $DomainNames =
    Import-CSV 'c:\testfiles\domain.csv' |
    Select -ExpandProperty Domain
    $DomainNames
    3414257440.domain.com
    domain1.domain.com
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

Maybe you are looking for

  • Weblogic 9.2 bug?

    in my servlet spec 2.3 webapp I have deployed struts in the web-inf/lib and am trying to use the html-el taglib. I think the BeanInfo classes are being ignored. To reproduce, try using tags from the struts/html-el.tld, e.g., the text input tag, and p

  • HP Pavilion g6 doesn't charge

    Hi, I have this laptop for about 2 years and I haven't any problems untill today. Last night I used it using charger without the battery being connected. After that, I put the battery inside to charge while it is shut down. Now, I can use it using th

  • VO is not getting executed or retains the previous state of execution

    Hi, We have a UI for the Party Site. Under this UI, you see the address for the party. When u change the address for the party, the old party site is inactivated and a new party site would be created. Assume that all the possible set of locations alr

  • Need textbook for muse

    Where can I find Muse textbook?

  • Costing Of Configurable Material

    We have a scenario here. We create the sales order in the sales Plant We do a STO  to Production Plant  where explode the  BOM  which has an configurable  sub-assembly When we run an  MRP this creates a another  STO  for  the configurable material  t