No public_html Directory on my Host

I use an off-the-peg open source formail script.
I just uploaded a contact page to someone else's site after they gave me their FTP details.  First problem I noticed was if I put public_html in my Host Directory box in my FTP details it would not connect.  Remove that and FTP all fine.
Then when I tested the form it took a million years and I got a message saying: "Unable to Create Check File" and this is what the formail FAQ says:
This is usually a configuration error in your server's PHP.
PHP must be configured to have a valid directory for creating temporary  files.
If FormMail cannot create a check file, then you need to contact your  hosting provider to have the problem with the temporary directory  solved.
Note that the temporary directory must be configured as a directory not a URL. Your hosting provider should know the difference!
As a workaround, you can create your own directory for temporary files.   Review the configuration setting in formmail.php called SCRATCHPAD
Further reading seemed also to point to the absence of public_html on the server but I don't know how to check that.  I have contacted the hosts and they seem like twits.  It's only email support and they seem to make cut and pasted, auto responses rather than answer any questions.  I can't see a public_html folder in the host file manager in the MyPANEL page (which is nothing like cPanel) and as I said, DW doesn't like to have it in my FTP settings.
Any advice would be terrific.
Martin

Many thanks both,
Bregent you seem to speak with such confidence.
With the formail script it suggests creating a file for a scratchpad:-
We recommend you create the directory above your web server  Document Root directory/folder, if possible.  For example, if your web pages are  served from:
/home/your-site/public_html
create a directory/folder called:
/home/your-site/fmscratchpad
This more secure as no browser will be able to view the scratch pad directory/folder.
Turns out though that the scratchpad is used to check the script version and send out an alert for updates.  Turning that off solved the problem.  The more complex solution described above, suggests creating a folder at the same level as public_html and I wasn't even sure I had one!
Martin

Similar Messages

  • After making a website with muse and launching it with Business Catalyst. My website gives a notice: To change this page, upload your website into the public_html directory. How can i upload my website into the public_html directory?

    Hello,
    I'm using a Mac and made a website with Muse. After making the website i published the site and launched this afterwards with Business Catalyst.
    When i enter my website, i got the notification: To change this page, upload your website into the public_html directory.
    Does anyone know how i can fix this? I'm a complete noob in this subject.
    Thank u for reading

    Could you post a link please?
    BC does not give that message - Would be good to see if it is indeed BC.

  • Public_html directory + NSAPI

    Hello,
              I am running WL 4.5.1 sp9 with NES 3.63 on the front end. The
              clustering is done on a multihomed Solaris 2.6. My question is, which
              public_html directory should NES's primary document root be pointing to when
              clustering is being implemented? Should it be the myserver/public_html
              (which is how I currently have it set up) or should it be the
              mycluster/public_html? Also, will it work if you create a symbolic link to
              the myserver/public_html directory within mycluster instead of copying it
              over? If this can be done, promoting the application to production will be
              much neater for me.
              Thanks.
              Elizabeth
              

    The default will be myserver/public_html. However, you can use absolute path
              to configure weblogic.httpd.documentRoot. You can configure all servers in
              your cluster point to the same directory.
              Hope this helps.
              Cheers - Wei
              Elizabeth Crefin <[email protected]> wrote in message
              news:8il7jc$hlb$[email protected]..
              > Hello,
              > I am running WL 4.5.1 sp9 with NES 3.63 on the front end. The
              > clustering is done on a multihomed Solaris 2.6. My question is, which
              > public_html directory should NES's primary document root be pointing to
              when
              > clustering is being implemented? Should it be the myserver/public_html
              > (which is how I currently have it set up) or should it be the
              > mycluster/public_html? Also, will it work if you create a symbolic link
              to
              > the myserver/public_html directory within mycluster instead of copying it
              > over? If this can be done, promoting the application to production will
              be
              > much neater for me.
              > Thanks.
              >
              > Elizabeth
              >
              >
              

  • Automatic ~username public_html directory mapping

    Hello dear j2ee community !
    How can I configure the j2ee server such that when someone type http://localhost/~username he is directly redirected to the public_html directory of the username ?
    I know that we can do this with tomcat (adding something like that in the server.xml file:
    <Listener className="org.apache.catalina.startup.UserConfig"
    directoryName="public_html"
    homeBase=c:\Homes"
    userClass="org.apache.catalina.startup.HomesUserDatabase"/>),
    but it doesn't work with j2ee.
    Can someone tell me how I can achieve that with j2ee ?
    Thanks a lot in advance !!

    Thanks for the tip, I've thought about it.
    But doesn't exist any automatic possibilities ? I mean, of course I can create this ~* servlet and then redirect the request to the public_html directory, but I would like that to be done automatically. Isn't it possible ?
    Thanks a lot.

  • Chagne Home Directory Server's Host Name

    I've tried to change the server's host name, and re-shared the home directory location so that in Workgroup manager, it will show up as a choice for the home folder location.
    After I selected the new location (with all the folders still in the same place), and tried loggin in as any user, it gives me an error saying there's a problem logging in.
    What should I do?
    (if I change everything back, everything works fine, but I'll need to change the host name eventually)

    Found a solution to avoid changing the Directory Server's name.

  • JSP files in public_html directory

    Hi,
    I'm trying to setup my account on a virtual dedicated linux server and my JSP files will not work unless I put them into webapps/ROOT.
    What do I have to do to be able to place them in the public_html folder? They are just simple JSP files.
    I've added *.jsp to the Tomcat URL Patterns.
    Thanks,
    Kris.

    Hi.
    You could manually create a WEB-INF/classes directory and put your package in there (%J2EE_HOME%/public_html/WEB-INF/classes).
    But this is a poor solution. You will need to modify the J2EE classpath to include your classes etc. If you really want to develop a portable solution, then you should consider creating a web application archive file (.war) for your web application. The server then automatically handles the class path issues for you, and you can deploy the .war file on any J2EE compliant application server.
    Detailed information on how to do this would be too long for me to publish here, but you can find very good information on how to do this on http://java.sun.com/j2ee/tutorial/. Check out the "Web Components" and " JavaBeansTM Components in JSP Pages" links under "Web Technology".
    Hope this helps.
    Oli Gauti.

  • How to reveal a .swf server directory behind a host html index file to save a Flash file to HD?

    I FIND YOUR FLASH FORMAT EXTREMELY USER-UNFRIENDLY.
    I spent two weeks to figure out how to save a complete .swf
    file to my local drive.
    Finding 48 files behind a main html doc hosting those .swf's
    took 48 hours.
    (Now I can't move my arm anymore due to RSI!)
    No application to save a Flash file, seems to be able to do that
    in 1,2,3 convenient steps.
    I always get bits and pieces or individual graphics.
    I NEVER GET THE ENTIRE MANUAL the way I can browse the Flash
    file in my browser.
    I am seriously thinking of never browsing a Flash file again
    if there is no solution to download e.g. a manual of my digital
    camera.
    I have the right to browse such a file at my convenience either
    on or offline! Online it's just impossible due to server
    overload.
    Now I only get the desadvantages of the format to deal with
    (e.g. tons of spamming advertising) whereas I should be able to
    enjoy the benefits. Eventhough I gave the manufacturer the right to
    fill up 10 MB on my drive, I never got a file on my PC. And even
    when I did, I wouldnt know where to find it...
    I hope Adobe would listen to the user more often...
    WHY DON'T YOU BUILD SOLUTIONS AS EASY AS A RIGHT MOUSE CLICK
    ALLOWING FOR SAVING A FLASH FILE!
    That can't be rocket science, is it?
    Thank you for paying attention to your customers.

    You can add parameters to the flashvars property in the HTML wrapper:
    http://livedocs.adobe.com/flex/3/html/help.html?content=passingarguments_3.html
    http://livedocs.adobe.com/flex/3/html/help.html?content=wrapper_01.html
    If this post answered your question or helped, please mark it as such.

  • Is there a public_html directory with forms server

    Our web server only has forms 6i server running. Is it possible to serve up simple HTML files as well as the .fmx files? If so, what directory do I deploy them to?

    Hi Steven
    Dems the breaks I suppose. One way past it would be to have one RoboHelp Server license and one RoboHelp Office license. Then have the other authors simply use Microsoft Word to maintain their content. The person that uses the RoboHelp Office (Client part) could then import and link the Word documents managed by the other authors. If you worked that way you would only be looking at a total outlay of $3,000 instead of $7,000. But I suspect that you might get a better deal than $7,000 if you worked with Sales.
    Keep in mind that RoboHelp Server relies upon the content created by RoboHelp. There is no "limited WYSIWYG editor". All it does is provide reporting as well as project merging. There is nothing about it that lends itself to a simple WYSIWYG editor that provides a window into the server content.
    I cannot speak to the other tools you cited. Maybe they do work in that manner and maybe they don't. And maybe you are misunderstanding the actual capabilities. I cannot say.
    Additionally, it's helpful to keep in mind that the way RoboHelp works today was initially designed and maintained by the folks now known as MadCap. Because of that, I'd be surprised to find that the MadCap products operate in a totally different manner. Maybe they do. Adobe acquired the product by virtue of acquiring macromedia. So they didn't design the way it works. Although they have enhanced it. I see no reason to shame Adobe.
    Can you expound on your claim that " there is virtually nothing RH does the others don't, and quite a bit  the others do that RH does not". What ios the "quite a bit" that others are doing that RoboHelp isn't? RoboHelp seems fairly competitive with its feature set to me.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Directory Structure for multiple applications at one host

    Can I have multiple (more than one) WEB-INF directory structures in the public_html directory for different web applications? If I do this, how do setup the url-pattern in the Servlet Mapping tag in the web.xml file? How do I setup the URL that calls the servlet from the HTML that has been send to the user�s browser?

    If I understand your question, you want multiple contexts. All App Servers/Web Servers allow you to setup multiple contexts. Normally if your root context is in /home/myhome/app_server/
    then you would setup multiple contexts by creating a folder for each context:
    /home/myhome/app_server/context1/
    /home/myhome/app_server/context2/
    Each would have their own full application/website. And the way to reference these would be as such:
    if the domain, www.mydomain.com, is mapped to /home/myhome/app_server/
    www.mydomain.com/context1/
    www.mydomain.com/context2/
    I think that is what you were asking. Hope it helps

  • IWeb creates folder in my public_html folder

    In Site Publishing Settings, I use FTP Server to publish my web page. let say my website is www.bbb.com and my directory/path is "/public_html"
    After I published my site, it created a folder called "www.bbb.com" in the "public_html" folder and my top website will be "www.bbb.com/www.bbb.com/welcome.html"
    why? Is this a bug or it is because of some setting in iWeb I set wrongly?
    So, every time i need to move/copy those files in the www.bbb.com folder to "public_html" in order to make my top page (www.bbb.com/welcome.html) viewable.
    Did anyone of you experience this?
    Thank you

    No, it is not a bug in iWeb, but just how iWeb publishes - when you publish to a folder iWeb creates a site folder with the name of your site on it, plus a separate index file - this is actually normal iWeb site structure.
    What you can do is firstly not name your site with your domain name, so call it something like site and then your url will be http://www.domain.com/site/pagename.
    Your other option of getting around this is to download Cyberduck for free (it is a dedicated ftp program). Open iWeb and publish your site to a local folder and then use iWeb to upload just the contents of your site folder to your public_html folder at your hosting company.
    You can also do it the other way as you are already doing and this is ditching your site folder and taking out the contents on your public_html folder at your server. Your url will then be http://domain.com/pagename.
    Be warned though that you are breaking iWeb site structure by doing this so if you need to use RSS feeds then they will not work like this.

  • Uploading to public_html

    I have redesigned my site using DW8 (from DWMX) and am using
    CPanel to upload it. However though index.html is in the
    public_html directory I am getting a Forbidden 403 error. What am I
    doing wrong? What it the step by step way to upload the files to
    the remote site using FTP? I am a relative beginner! Please
    help.

    For me to do anything more, i'd need access to the site.
    If you would be comfortable doing this [you can change the
    site's master
    password in CPanel after i look around. Google me in
    groups.google.com in
    this newsgroup for references] please do this:
    go to dw menu-->Site-->Manage Sites
    select this site, and click export.
    Save the .ste file to a location where you will find it to
    send it to me.
    Then email me at blu at formdude dot com and attach the .ste
    file.
    Also put in the email the ftp information for this site such
    as ftp address,
    username, password
    Then when i get a chance, i'll poke around on the host server
    looking for
    some setting change that is denying all public access to
    files.
    side comment: having a year's contract with a host when the
    hosting doesn't
    work and their support support staff isn't helping is the
    main problem i
    think.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Install R12 on a Virtual Machine hosted on Windows Vista

    I wanted to install Oracle EBS R12.1.1 on Windows Vista Home Premium 64-bit but used to get .\jre\nt\1.6.0\bin\java error. Hussein Sawwan
    helped and said that this is not certified. He adviced me to create a VMWare Server. Following is my experience. I hope it is helpful. Any
    suggestions, additions are more than welcome. Thanks to all who helpmed me especially Hussein Sawwan, Helios, Gareth Roberts.
    I used to get .\jre\nt\1.6.0\bin\java error after the installation would zoom through 33%. That was because my staging area was not correct. The staging area should be just next to c:\ or whatever be the root directory (or drive). No space or special characters in folder name. My current structure is as follows:
    c:\r12stage. Under r12stage I have following folders and subfolders
    oraAppDB -- 49 Disks
    oraApps -- 11 Disks
    oraAS -- 3 Disks (This comes from the Rapid Install Tools)
    oraDB -- 5 Disks
    startCD -- 1 Disk plus other folders. Just copy startcd from the unzipped download and paste to r12stage area.
    I then created a virtual machine using VMWare Server (free download but need to register to get the serial number). Because I installed
    vmware server on Vista Home Premium 64 bit Host OS, I have to boot my machine by pressing F8 and then select Disable Digital Signature
    Enformcement. Thanks to Gareth Roberts for this tip. Create a vm and install Windows 2003 by selecting the .img file (first cd) by selecting Use ISO image and then path of the windows 2003 cd 1 (zipped file). start the virtual machine, that will install windows 2003 and then ask for location of 2nd cd. On the host machine, where the second win 2003 zip file resides, unzip the second zip file and name the folder as cd2. share this folder to the __vmware_user__ and from the virtual machine, map network drive to \\hostmachinename\cd2. Select this as the location of cd2 and complete the installation. Install MKS Toolkit from http://cygwin.com/ and visual c++ from Microsoft website. for information on this please refer to the following URL. Thanks to Muhammad Habib
    http://mhabib.wordpress.com/2007/03/14/installing-oracle-applications-e-bussiness-11i-on-windows-xp/
    After installation is done and Windows Update is run, share the r12stage directory on the host machine to the vmuser and launch rapidwiz.cmd from the command prompt and follow the instruction. For internet connection from the VM use Ethernet as NAT.
    If the installation errors halfway through, clean up your VM by following instructions in document id 292424.1 in MetaLink. If you dont have access to Metalink then I summarize the steps briefly over here.
    Launch the Registry Editor.
    Navigate to the HKEY_LOCAL_MACHINE\Software key.
    Select the Apache Group subkey and delete it.
    Select the Oracle subkey and delete it.
    Navigate to the HKEY_LOCAL_MACHINE\System\Current Control Set\Services.
    Carefully select and delete each service beginning with Oracle. For example, delete "Oracle Apache Server PROD_<nodename>".
    When you are finished, exit the Registry Editor.
    Navigate to the Environment Variables editing screen according to your system setup. For example, right-click My Computer and select
    Properties. From the Advanced tab, click the Environment Variables button.
    Select the following system variables if created during the failed installation, and delete them: DISCO_JRE, DISCO_VBROKER, JSERV,
    VBROKER_JAVAVM, VBROKER_TAG, WV_GATEWAY.
    Select the Path variable, but do not delete it. Carefully edit it and remove any component with "Oracle" in the name, or that otherwise
    references the failed install. For example, delete "E:\11.5.10\test\visora\8.0.6\bin;".
    Save and exit System Properties.
    Open a command window and navigate to the C:\Program Files\ directory. Delete the Oracle subdirectory.
    If your Oracle Inventory directory was not C:\Program Files\Oracle\Inventory and was therefore not deleted in the previous step, locate it
    and delete it.
    Restart your machine
    It is now safe to remove the Oracle filesystem that was partially installed during the failed installation. Go to the base install directory,
    or top-level directory under which you installed either the Database Server (DATA, DB) or the Applications Tier Server (APPL, ORA, COMN)
    directories, or both. Note that you may choose to rename a directory before you delete it. This allows you to use the same directory name and start a new installation even before you finish the delete filesystem operation. For example, if you placed your filesystem in a "test" directory under
    "E:\11.5.10":
    C:\> E:
    E:\> cd 11.5.10
    E:\> rename test oldtest
    E:\> del /s /q oldtest
    In another window:
    C:\> cd <stage install directory>
    Q:\> rapidwiz.cmd
    After cleaning up if you still get error like RW-50004: Error Code received when running external process. Check log file for
    details. Running database Install driver for VIS instance, after 13% complte step 1 of 5 then I suggest that you re-create the machine and follow the above steps again. Including installing win 2003, mks tool kit , vc++, etc. It will be a success.
    Starting concurrent manager takes up enormous memory and slows down everything, so if you dont need it then dont ever start it. APPS password is apps and sysadmin user is sysadmin.
    Good luck.
    Mahesh Acharya

    I had Vista 64-bit machine, installed Ubuntu in VMWare. Installed Oracle apps on 32-bit Ubuntu under VMware and was able to access Oracle apps. But, it is very very slow. It hangs sometimes and takes 15-20mins to display Ubuntu screens. Am I missing something here. I have a 4GB RAM and VMWare can not use all the 4GB. It may be using 2GB of 4GB. Am I missing something?

  • Unable to connect multiple MAF components in a WPF host application

    I'm trying to connect my MAF component parts for the addin extensibility to work, however I'm getting certain errors while trying to build my add in store.
    string path = @"...\MyProject\Extensibility\Output";
    string[] errorList = AddInStore.Rebuild(path);
    that's the pipeline path, which looks like according to documentation:
    Extensibility\
    Output\
    AddIns
    AddInSideAdapters
    AddInViews
    Contracts
    HostSideAdapters
    My WPF host app DLL file is located under this directory:
    MyProject\WPFApp\bin\debug
    So, I'm unsure where to build my HostView. Currently the output is the pipeline root directory (Extensibility\Output)
    I have 4 errors in my errorList:
    While examining an assembly for pipeline segments, got a ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. File Name: ...MyProject\Extensibility\Output\AddInSideAdapters\AddInSideAdapters.dll
    2:
    Could not connect up a part in a pipeline to its neighbors: Contract Name: "IAddInContract" Location: "Contracts\Contracts.dll".
    3:
    Could not connect up a part in a pipeline to its neighbors: AddInBase Name: "AddInView" Location: "AddInViews\AddInViews.dll".
    4:
    Could not connect 2 valid add-in model parts.
    And the code of addin side adapter, contact and addin view respectively:
    [AddInAdapter]
    public class AddInSideAdapter : ContractBase, IAddInContract
    private AddInView view;
    public AddInSideAdapter(AddInView view)
    this.view = view;
    public void Initialize(IPluginHandler handler)
    view.Initialize(handler);
    public INativeHandleContract GetCustomUI()
    return FrameworkElementAdapters.ViewToContractAdapter(view.GetCustomUI());
    [AddInContract]
    public interface IAddInContract: IContract
    void Initialize(IPluginHandler handler);
    INativeHandleContract GetCustomUI();
    [AddInBase]
    public abstract class AddInView
    public abstract void Initialize(IPluginHandler handler);
    public abstract FrameworkElement GetCustomUI();
    They're output directories are ok, all building into the corresponding pipeline segments. I really cannot understand what's failing. Pipeline structure is ok, build paths of segments are ok (just not sure about the HostView and the host app). The path variable
    is ok, i just omitted the entire path for brevity

    Hi Mefhisto,
    >>”So, I'm unsure where to build my
    HostView. Currently the output is the pipeline root directory”
    I found some information about your problem in “Pipeline Development Requirements”,It said “The host application and the host view are typically deployed
    in the same directory. The pipeline directory can be in any location but is typically in the same directory as the host application.”This is the link of the document :
    https://msdn.microsoft.com/en-us/library/bb384240(v=vs.90).aspx. And there are several samples,you can refer to it for reference.
    http://clraddins.codeplex.com/wikipage?title=Samples&referringTitle=Home

  • How to configure Airport Extreme AFP disk sharing to host multiple users' home-directories (Lion, using autofs)

    I have this working, but only by completely bypassing access control, using guest access with read+write permissions.
    Do I need to buy Lion Server, to do this. All my past unix/linux experience says Lion Server should _not_ be necessary.
    This seems like a simple & obvious setup objective, but it is proving to be harder than I would imagine.
    Setup:
    multiple users, sharing two mac mini's running OSX Lion
    connected to an Airport Extreme (4th gen) with a USB disk shared (either via disk password, AEBS password, or using AEBS user's passwords).
    After much experimentation and web research, I finally have managed to get the mini's to auto mount the Airport Extreme's AFP shared USB disk. Well almost... It only works if, on the Airport, I set the guest access permissions to read+write and select the "Secure Shared Disks" method to "With disk password" or "with Airport Extreme password".  In other words, it only works if I essentially bypass/disable access control by using the guest authentication mechanism to the AFP shared disk.
    On the Lion side of this, I am automounting the users directories via "autofs". The config files for this are
    /etc/auto_master:
    # Automounter master map
    +auto_master            # Use directory service
    /net                    -hosts          -nobrowse,hidefromfinder,nosuid
    /home                   auto_home       -nobrowse,hidefromfinder
    /Network/Servers        -fstab
    /-                      -static
    /-                      auto_afp
    /etc/auto_afp:
    # Automounter AFP master map
    # https://discussions.apple.com/thread/3336384?start=0&tstart=0
    /afp/users -fstype=afp afp://;AUTH=No%20User%[email protected]/Users/
    Then, after rebooting and verifying read+write access to the /afp/users directories, I change each user's home directory: In System Preferences > System > Users & Groups, I right-click over the users to access the Advanced Options, changing the Home directory field to point at the AFP-mounted /afp/users/Users/* home directories.
    I experimented with alternate UAM specifications, as well as both OSX and AESB users & passwords. Using guest access is the only thing that has worked.
    Any pointers would be appreciated...

    Based on lots more experimentation which confirms the information in a parallel discussion (cf. Automount share as non ROOT or SYSTEM user! https://discussions.apple.com/thread/3221944), I have concluded that the Lion 10.7.2 implementation of AutoFS mechanism is broken. I submitted a bug report via apple.com/feedback.
    Work arounds..?
    Earlier I wondered if installing Lion OSX Server was necessary.  The more I contemplate this, the more I am convinced it _should_not_ be necessary. The client-server architecture is clear: my mac's are the file-server client's and the Airport Extreme is supposed to act as the file server. The only thing instaling Lion Server would do (besides enriching Apple.com) is enable me to configure one of the mac's as the file server. This would require it to be "always on" (thus enriching my electric utility as wel).  Okay, an additional benefit would be configuring software RAID disks attached to the Lion server, but Time Machine has worked fine for me in the past, backing up to disks mounted on the Airport Extreme.
    One solution is to create a disk partition for each user and instruct each user to connect / authenticate to the Airport Extreme AFP share at login.  The multiplicity of partitions is necessary since the first user to mount the AFP share, takes ownership of it, blocking other users from accessing that disk partition.  A user can "steal" ownership by reconnecting, but this will leave the other user's applications & open files dangling.
    This disfunctional situation really *****.  Before instaling Lion, I put a 64 GB SSD (solid state disk) in each of our mac's. I did this expecting to easily configure the /Users/* data on external networked storage. I'm having a dejavu "Bill Gates"-ware moment; problems like this were why I abandoned Windoz.
    I will make a few more experiments using the depreciated /etc/fstab mechanism.  Maybe that will bypass the broken-ness of AutoFS...? Alternately, I guess I could also try to run Kerberos authentication to bypass whatever is broken in AutoFS, but that would require a running a Kerberos daemon somewhere.  Possibly I could configure a Kerberos service to run on both my mac's (without installing Apple's Lion Server)...?
    Stay tuned...

  • 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

Maybe you are looking for

  • Issue during automatic Creation of Work Order from Notification

    Hi, I have a issue during automatic Creation of Work Order from Notification. BADI implemented: NOTIF_EVENT_POST BAPI called in BADI: BAPI_ALM_ORDER_MAINTAIN I am able to create Work Order successfully but after that i need to update notification hea

  • SQL Server 2005 to Oracle 10.2.0.4 Migration

    Hi, While converting from SQL Server 2005 DB to Oracle 10.2.0.4 , The data migration completed. The source is having Chinese and Japanese characters also, Oracle Char Set set to Unicode(AL32UTF8) After the migration all the chinese and Japanese chars

  • I have uninstalled Flash Player and when downloading version 11.6 I get error on script line

    I have uninstalled Flash Player and am installing version 11.6 and I get "error in the script line" and the install stops. 

  • Can't connecto to home 802.11b

    I can't seem to connect to my router at home with my shiny new MBP. It's a DLink 614+ and my G5 connects perfectly. When I enable WEP and try to connect I'm prompted for the password but then internet connect just says "there was an error connecting

  • Contact Sheet??

    Using Photoshop CS5, I can't figure out how to make a contact sheet with a bunch of photo's.