Can't find my mistake

I am writing a user creation script and just working through my variables at this point.  So i have the script importing a csv file with user info.  Based on that user info it creates a series of variables three of which i am using the switch command
to choose the string that is associated with another string.  that all seems to work fine however when the message to type the $dept variable.  the read-host is showing the $upn of the first user to go through not the user that it is actually setting
the variable for.  like i said the variables seem to be setting properly just the output in the shell shows the wrong upn for what i am updating.. code and output below:         
function TFX-CreateNewUsers{
       [CmdletBinding()]
        param(
            [string]$logfile = 'c:\PowerShell_Logs\UserCreationErrors.txt',
            [Switch]$LogErrors,
            [Parameter(Mandatory = $true,
                       valuefrompipeline = $true,
                       HelpMessage = "Please provide valid path and file name to the CSV file with the user information.")]
            [Alias('csv')]
            [string]$FilePath
        $date = Get-Date -Format g
        $addn = (Get-ADDomain).DistinguishedName
        $dnsroot = (Get-ADDomain).DNSRoot
        $userlist = Import-Csv $FilePath
        $userlist | ForEach-Object{
              If (($_.GivenName -eq '') -Or ($_.LastName -eq ''))
                   {Write-Host 'ERROR: Please provide valid GivenName, LastName and Initials. Processing stopped' -ForegroundColor Red
                   "$date ERROR: Please provide valid GivenName, LastName and Initials. Processing stopped" | Out-File $logfile -Append
                   Break
              Else {
                   $upn="[email protected]"
                   $site=$_.site
                      switch ($site) {
                          Arl {$homed = "\\share\global\home\medical\na\arl"}
                          Ash {$homed ="\\share2\user"}
                      switch ($site) {
                          Arl {$HDrive = "H:"}
                          Ash {$HDrive ="U:"}
                      switch ($Site) {
                        Arl {$ou="OU=Users,OU=ARL,OU=NA,OU=company,DC=company,dc=global,dc=pvt"}
                        Ash {$dept = Read-Host "Enter Asheboro Department for $upn. Accounting, Engineering, Human Resources, Information Technology, Manufacturing, or Quality Assurance"
                             $ou="OU=$dept,OU=Users,OU=ARL,OU=NA,OU=company,DC=company,dc=global,dc=pvt"}
                   $First=$_.GivenName
                   $last=$_.LastName
                   $sam=$first.substring(0,1) + $last
                   $Office=$_.OfficeName
                   $description=$_.Description
                   $street=$_.StreetAddress
                   $city=$_.City
                   $zip=$_.postalcode
                   $state=$_.state
                   $Company=$_.Company
                   $Dept=$_.Department
                   $Title=$_.title
                   $mail=$upn
                   $phone=$_.phone
                   $manager=$_.manager
                   $Location=$_.Country
                   $pass=$_.Password
                   $expires=$_.passwordneverexpires
                   $Enabled=$_.Enabled
                   $setpass = ConvertTo-SecureString -AsPlainText $pass -force
                   $display="$last, $first"
                   Write-Verbose "$sam,$HomeD,$HDrive,$OU,$phone,$site"
Output when showing my variables and asking for the dept
VERBOSE: SRogers3,\\share\global\home\medical\na\arl,H:,OU=Users,OU=ARL,OU=NA,OU=company,DC=company,dc=global,dc=pvt,ARL
Enter Asheboro Department for [email protected] (This should be the user below). Accounting, Engineering, Human Resources, Information Technology, Manufacturing, or Quality Assurance: asdf
VERBOSE: EScott,\\share2\user,U:,OU=asdf,OU=Users,OU=ARL,OU=NA,OU=company,DC=company,dc=global,dc=pvt,,ASH

I restructured this and removed some subtle mistakes.  The layout should also be easier to debug.
function TFX-CreateNewUsers{
[CmdletBinding()]
param(
[string]$logfile='c:\PowerShell_Logs\UserCreationErrors.txt',
[Switch]$LogErrors,
[Alias('csv')]
[Parameter(Mandatory = $true,
valuefrompipeline = $true,
HelpMessage = "Please provide valid path and file name to the CSV file with the user information."
)][string]$FilePath
$date = Get-Date -Format g
$addn = (Get-ADDomain).DistinguishedName
$dnsroot = (Get-ADDomain).DNSRoot
Import-Csv $FilePath |
ForEach-Object{
If($_.GivenName -eq '' -Or $_.LastName -eq ''){
Write-Host 'ERROR: Please provide valid GivenName, LastName and Initials. Processing stopped' -ForegroundColor Red
"$date ERROR: Please provide valid GivenName, LastName and Initials. Processing stopped" | Out-File $logfile -Append
}else{
$First=$_.GivenName
$last=$_.LastName
$sam=$first.substring(0,1) + $last
$Office=$_.OfficeName
$description=$_.Description
$street=$_.StreetAddress
$city=$_.City
$zip=$_.postalcode
$state=$_.state
$Company=$_.Company
$Dept=$_.Department
$Title=$_.title
$mail=$upn
$phone=$_.phone
$manager=$_.manager
$Location=$_.Country
$pass=$_.Password
$expires=$_.passwordneverexpires
$Enabled=$_.Enabled
$setpass = ConvertTo-SecureString -AsPlainText $pass -force
$display="$last, $first"
$upn="[email protected]"
if($_.site -eq 'Arl'){
$HDrive='H:'
$ou='OU=Users,OU=ARL,OU=NA,OU=company,DC=company,dc=global,dc=pvt'
$homed='\\share\global\home\medical\na\arl'
}elseif($_.site -eq 'Ash'){
$homed='\\share2\user'
$HDrive='U:'
$dept=Read-Host "Enter Asheboro Department for $upn. Accounting, Engineering, Human Resources, Information Technology, Manufacturing, or Quality Assurance"
$ou="OU=$dept,OU=Users,OU=ARL,OU=NA,OU=company,DC=company,dc=global,dc=pvt"
Write-Verbose $sam,$HomeD,$HDrive,$OU,$phone,$site
This format for braces helps to prevent errors because the braces do not get lost in the strings like your method does.
¯\_(ツ)_/¯

Similar Messages

  • Can you find the mistake in my connection pool?

    Can Someone help me with my connection pool coded below.
    I retrieve the data sent by my connection pool as follows:
    int Id = UserDB.*getUserId(emailAddress)*;
    But int Id always turns out to be 0, no matter what emailAddress I put in.
    My Connection Pool:
    public static int getUserId(String emailAddress)
    ConnectionPool pool = ConnectionPool.getInstance();
    Connection connection = pool.getConnection();
    PreparedStatement ps = null;
    ResultSet rs = null;
    String query = "SELECT UserId FROM User " +
    "WHERE EmailAddress = ?";
    try
    ps = connection.prepareStatement(query);
    ps.setString(1, emailAddress);
    rs = ps.executeQuery();
    int Id = rs.getInt("UserId");
    return Id;
    catch(SQLException e)
    e.printStackTrace();
    return 0;
    finally
    DBUtil.closeResultSet(rs);
    DBUtil.closePreparedStatement(ps);
    pool.freeConnection(connection);
    }

    You forgot "if (rs.next()) { ... get id ...} else { ... email address not found ... }"
    EDIT: Also, the "e.printStackTrace()" should've told you an exception was being thrown.
    Edited by: paul.miner on Jul 10, 2008 11:42 AM

  • I deleted the pre-installed iPhoto app from my iPhone 5s by mistake. And I can't find the same app in the App Store. How do I recover it?

    I deleted the pre-installed iPhoto app from my iPhone 5s by mistake. And I can't find the same app in the App Store. How do I recover it?

    iPhoto for iOS is no longer being offered by Apple and has been replaced by the Photos app. It is not compatible with iOS 8.  This Apple document may help:  Migrating from iPhoto for iOS to Photos on iOS 8 - Apple Support

  • Newbie mistake, but I can't find it, help appreciated on XML import

    I'm sure I'm making a newbie mistake but I can't find it. If someone could tell me what I'm doing wrong I would appreciate it.
    Step one works (i'm logged as user xdb on the database):
    SQL*Plus: Release 10.1.0.2.0 - Production on Wed Dec 20 13:47:53 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> Declare
    2 ignore boolean;
    3 begin
    4 ignore :=dbms_xdb.createFolder('/datamart');
    5 ignore :=dbms_xdb.createFolder('/datamart/CustomerCare');
    6 ignore :=dbms_xdb.createFolder('/datamart/CustomerCare/xsd');
    7 ignore :=dbms_xdb.createFolder('/datamart/CustomerCare/xml');
    8 commit ;
    9 end;
    10 /
    PL/SQL procedure successfully completed.
    Step two works, where I drag and drop via Windows Explorer my xsd file into http://d01db:8085/datamart/CustomerCare/xsd. It has a size of about 7k or so. Again, when connecting to the respository with Windows Explorer, I'm logging in as xdb.
    Step three works, where I register the schema that I just put into the XML repository. Still logged into SQLPlus as xdb.
    SQL> begin
    2 dbms_xmlschema.registerURI
    3 (schemaURL => 'http://xmlns.oracle.com/xdb/Steton.xsd'
    4 ,schemaDocURI => '/datamart/CustomerCare/xsd/Steton.xsd'
    5 ,genTables => true
    6 ) ;
    7 end;
    8 /
    PL/SQL procedure successfully completed.
    SQL> describe STETONAUDITRESULTS;
    Name Null? Type
    TABLE of SYS.XMLTYPE(XMLSchema "http://xmlns.oracle.com/xdb/Steton.xsd" Element "StetonAuditResults"
    SQL>
    By the way, here is the schema:
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" id="StetonAuditResults" xdb:storeVarrayAsTable="true">
         <xs:element name="StetonAuditResults" xdb:defaultTable="STETONAUDITRESULTS">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Control">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="ResultCount" type="xs:int"/>
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                        <xs:element name="AuditResults">
                             <xs:complexType>
                                  <xs:choice maxOccurs="unbounded">
                                       <xs:element name="AuditResult">
                                            <xs:complexType>
                                                 <xs:sequence>
                                                      <xs:element name="AuditResultGlobalID" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="AuditGlobalID" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="AuditName" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="AccountID" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="AccountName" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="AuditorID" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="AuditorName" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="AcctRepName" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="AuditTypeID" type="xs:int" minOccurs="0"/>
                                                      <xs:element name="AuditTypeName" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="DivisionID" type="xs:int" minOccurs="0"/>
                                                      <xs:element name="FaxBack" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="EMailBack" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="StartDateLocal" type="xs:dateTime" minOccurs="0"/>
                                                      <xs:element name="StartDateUTC" type="xs:dateTime" minOccurs="0"/>
                                                      <xs:element name="EndDate" type="xs:dateTime" minOccurs="0"/>
                                                      <xs:element name="UploadDate" type="xs:dateTime" minOccurs="0"/>
                                                      <xs:element name="ProcessDate" type="xs:dateTime" minOccurs="0"/>
                                                      <xs:element name="ApplicationVersion" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="AuditResultNotes" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="AuditorSignature" type="xs:base64Binary" minOccurs="0"/>
                                                      <xs:element name="AcctRepSignature" type="xs:base64Binary" minOccurs="0"/>
                                                      <xs:element name="InitialAuditResultGlobalID" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="RecordType" type="xs:string" minOccurs="0"/>
                                                      <xs:element name="ModifiedDate" type="xs:dateTime" minOccurs="0"/>
                                                      <xs:element name="CategoryResults">
                                                           <xs:complexType>
                                                                <xs:choice minOccurs="0" maxOccurs="unbounded">
                                                                     <xs:element name="CategoryResult">
                                                                          <xs:complexType>
                                                                               <xs:sequence>
                                                                                    <xs:element name="AuditResultGlobalID" type="xs:string"/>
                                                                                    <xs:element name="CategoryGlobalID" type="xs:string" minOccurs="0"/>
                                                                                    <xs:element name="CategoryName" type="xs:string" minOccurs="0"/>
                                                                                    <xs:element name="CategoryReference" type="xs:string" minOccurs="0"/>
                                                                                    <xs:element name="CategoryResultNotes" type="xs:string" minOccurs="0"/>
                                                                                    <xs:element name="QuestionResults">
                                                                                         <xs:complexType>
                                                                                              <xs:choice minOccurs="0" maxOccurs="unbounded">
                                                                                                   <xs:element name="QuestionResult">
                                                                                                        <xs:complexType>
                                                                                                             <xs:sequence>
                                                                                                                  <xs:element name="AuditResultGlobalID" type="xs:string"/>
                                                                                                                  <xs:element name="CategoryGlobalID" type="xs:string" minOccurs="0"/>
                                                                                                                  <xs:element name="QuestionGlobalID" type="xs:string" minOccurs="0"/>
                                                                                                                  <xs:element name="QuestionText" type="xs:string" minOccurs="0"/>
                                                                                                                  <xs:element name="QuestionReference" type="xs:string" minOccurs="0"/>
                                                                                                                  <xs:element name="ChoiceGlobalID" type="xs:string" minOccurs="0"/>
                                                                                                                  <xs:element name="ChoiceText" type="xs:string" minOccurs="0"/>
                                                                                                                  <xs:element name="ChoicePointsPossible" type="xs:double" minOccurs="0"/>
                                                                                                                  <xs:element name="ChoicePointsEarned" type="xs:double" minOccurs="0"/>
                                                                                                                  <xs:element name="QuestionResultNotes" type="xs:string" minOccurs="0"/>
                                                                                                                  <xs:element name="QuestionCommentResults">
                                                                                                                       <xs:complexType>
                                                                                                                            <xs:choice minOccurs="0" maxOccurs="unbounded">
                                                                                                                                 <xs:element name="QuestionCommentResult">
                                                                                                                                      <xs:complexType>
                                                                                                                                           <xs:sequence>
                                                                                                                                                <xs:element name="AuditResultGlobalID" type="xs:string"/>
                                                                                                                                                <xs:element name="CategoryGlobalID" type="xs:string" minOccurs="0"/>
                                                                                                                                                <xs:element name="QuestionGlobalID" type="xs:string" minOccurs="0"/>
                                                                                                                                                <xs:element name="QuestionCommentGlobalID" type="xs:string" minOccurs="0"/>
                                                                                                                                                <xs:element name="QuestionCommentText" type="xs:string" minOccurs="0"/>
                                                                                                                                                <xs:element name="QuestionCommentResultNotes" type="xs:string" minOccurs="0"/>
                                                                                                                                           </xs:sequence>
                                                                                                                                      </xs:complexType>
                                                                                                                                 </xs:element>
                                                                                                                            </xs:choice>
                                                                                                                       </xs:complexType>
                                                                                                                  </xs:element>
                                                                                                             </xs:sequence>
                                                                                                        </xs:complexType>
                                                                                                   </xs:element>
                                                                                              </xs:choice>
                                                                                         </xs:complexType>
                                                                                    </xs:element>
                                                                               </xs:sequence>
                                                                          </xs:complexType>
                                                                     </xs:element>
                                                                </xs:choice>
                                                           </xs:complexType>
                                                      </xs:element>
                                                 </xs:sequence>
                                            </xs:complexType>
                                       </xs:element>
                                  </xs:choice>
                             </xs:complexType>
                        </xs:element>
                   </xs:sequence>
              </xs:complexType>
              <xs:key name="StetonAuditResultsKey_AuditResult">
                   <xs:selector xpath=".//AuditResult"/>
                   <xs:field xpath="AuditResultGlobalID"/>
              </xs:key>
              <xs:key name="StetonAuditResultsKey_CategoryResult">
                   <xs:selector xpath=".//CategoryResult"/>
                   <xs:field xpath="AuditResultGlobalID"/>
                   <xs:field xpath="CategoryGlobalID"/>
              </xs:key>
              <xs:key name="StetonAuditResultsKey_QuestionResult">
                   <xs:selector xpath=".//QuestionResult"/>
                   <xs:field xpath="AuditResultGlobalID"/>
                   <xs:field xpath="CategoryGlobalID"/>
                   <xs:field xpath="QuestionGlobalID"/>
              </xs:key>
              <xs:keyref name="AuditResultCategoryResult" refer="StetonAuditResultsKey_AuditResult">
                   <xs:selector xpath=".//CategoryResult"/>
                   <xs:field xpath="AuditResultGlobalID"/>
              </xs:keyref>
              <xs:keyref name="CategoryResultQuestionResult" refer="StetonAuditResultsKey_CategoryResult">
                   <xs:selector xpath=".//QuestionResult"/>
                   <xs:field xpath="AuditResultGlobalID"/>
                   <xs:field xpath="CategoryGlobalID"/>
              </xs:keyref>
              <xs:key name="StetonAuditResultsKey_QuestionCommentResult">
                   <xs:selector xpath=".//QuestionCommentResult"/>
                   <xs:field xpath="AuditResultGlobalID"/>
                   <xs:field xpath="CategoryGlobalID"/>
                   <xs:field xpath="QuestionGlobalID"/>
                   <xs:field xpath="QuestionCommentGlobalID"/>
              </xs:key>
              <xs:keyref name="QuestionResultlQuestionCommentResult" refer="StetonAuditResultsKey_QuestionResult">
                   <xs:selector xpath=".//QuestionCommentResult"/>
                   <xs:field xpath="AuditResultGlobalID"/>
                   <xs:field xpath="CategoryGlobalID"/>
                   <xs:field xpath="QuestionGlobalID"/>
              </xs:keyref>
         </xs:element>
    </xs:schema>
    Step four is where I have problems. I'm using Windows Explorer to drag and drop an XML instance document into http://d01db:8085/datamart/CustomerCare/xml while logged into the repository as xdb.
    Here's some of the test file that I'm using.
    <?xml version="1.0" standalone="no"?>
    <StetonAuditResults xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/xdb/Steton.xsd">
         <Control>
              <ResultCount>112</ResultCount>
         </Control>
    </StetonAuditResults>
    Note, the test XML file is 427k in size and I can't post it here. There is a lot of data between the </Control> tag and the </StetonAuditResults> tag.
    During the Drag and Drop I get the message "An error occured copying some or all of the selected files."
    My first suspicision was that the XML document failed validation. So I changed the namespace line to
    <StetonAuditResults xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="H:\StetonCustomerCare\Steton.xsd">
    I then started Altova's XMLSpy and the XML document is well formed and it validates.
    I then changed the namespace line in the XML document to
    <StetonAuditResults xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    and I could use Windows Explorer to drag and drop the file into the XML DB respository of http://d01db:8085/datamart/CustomerCare/xml, but this version doesn't shred the XML document into the SQL tables that I need.
    I then deleted the file from the repository.
    I then changed the namespace line in the XML document to <StetonAuditResults xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Steton.xsd">
    because someone told me to, and because I have seen an FAQ in this forum suggest this approach. I can copy using Windows Explorer into the http://d01db:8085/datamart/CustomerCare/xml. However, the file size via Windows Explorer is 427kb. Also "select count(*) from STETONAUDITRESULTS;" returns zero.
    What am I doing wrong?
    My background, I'm not an Oracle DBA, but I can code SQL select statements. So if I need to do something involving Oracle DBA privileges, please document it well. I will have to get the DBA's involved.
    My goal is import this XML file so that I can use it as a feed for a datamart. The first XML file in text format is 27mb.
    Thanks again for reading this far.

    I guess you have a namespace issue...(schema registered is not the same as the layout in your XML instance/doc, therefor will not be inserted). You have access to the XDB account...thats all you need (more then enough, i mean, you don't need dba privs).
    on the FAQ Mark explains...
    Why is the size of my XML document 0 bytes when viewed via HTTP or FTP ?
    Posted: Sep 1, 2006 6:07 AM in response to: mdrake in response to: mdrake      
    When a schema based XML is loaded into the XML DB repository via HTTP, FTP or dbms_xdb.createResource() the document is converted from a textual serialization of XML into a series of objects. At this point the size of the document becomes (a) meaningless and (b) difficult / expensive to calculate.
    The first question is what is meant by the size of the document once it has been stored using object-based persistence ? There are two possibilities
    (1) The number of bytes used the text serialization of the XML document.
    (2) The number of bytes required to store the internal object representation of the document. In this case the does the size include the bytes used for keys, refs indexes, etc ?
    Since (1) would be expensive to maintain as the document is updated (particularly in the case of partial updates) and (2) is expensive to calculate on a document by document basis, XML DB shows the size of all schema based XML documents as 'zero' bytes.
    Note that this also applies to the size of the registered version of XML Schema documents, which can be found in the folder tree /sys/schemas.
    If a schema based XML document is loaded into the repository and does not appear as 0 bytes long when viewed via HTTP or WebDAV this means that XML DB was unable to identifiy the XML schema the XML document is associated with.
    Note that immediatlely after uploading a document in Windows Explorer using the WebDAV protocol the size of the document will be non-zero, since the original size is cached by the Microsoft WebDAV client. However once a refresh of the folder is performed in Windows Explorer the size should be shown as zero if the document was recognized as a schema based document.

  • HT1338 I deleted all the files on my "all my file" in the finder by mistake. Can you please help me to get them back

    I DELETED ALL MY THE FILES ON THE "ALL MY FILES IN THE FINDER BY MISTAKE. PLEASE I WILL BE HAPPY IF YOU CAN HELP ME LOCATE THEM. THANK YOU.

    They should still be in the Trash. Click on the Trash icon in the Dock and drag and drop all your deleted items to the Desktop. You'll just have to tidy them away in your own time.

  • I just wrote over a pages document by mistake and then saved it, can I find the older version somewhere?

    I just wrote over a pages document and saved it by mistake, can I find the older version of the document?

    What exactly do you mean when you say "You Wrote Over a Pages Document"?
    Did you highlight the text in the document and then start typing?
    Did you use some type of Insert function to erase the text already in the document as you type the new text?
    If you dodn't do either of those things more then likely all the text that was original in that document is still there, just on another page.
    If you did do one of the above it is gone, Bye Bye, See you later.

  • I bought a HD and the Itunes Stores say that the movie (Pretty Women) has Itunes Extras. Why I can not find it? It is a mistake from Apple? What happen if I buy the movie because the Extras and now I can not watch it? I have an Ipad last generation.

    I bought a HD and the Itunes Stores say that the movie (Pretty Women) has Itunes Extras. Why I can not find it? It is a mistake from Apple? What happen if I buy the movie because the Extras and now I can not watch it? I have an Ipad last generation.

    What version of iOS do you have on your iPad (Settings > General > About > Version), and is it connected to wifi ?
    From Buy and play movies with iTunes Extras - Apple Support :
    Here’s what you need to stream the new iTunes Extras:
    Mac using OS X Mavericks v10.9.3 or later and iTunes 11.3 or later
    PC using iTunes 11.3 or later
    Apple TV (2nd and 3rd generation or later) using Apple TV software 6.2 or later
    iPhone, iPad, or iPod touch using iOS 8 or later (You need to connect to Wi-Fi. Extras won't appear if you're connected to a cellular network.)
    An active Internet connection
    You can use the steps below on your Apple TV, Mac, PC, or iOS device for any purchased, HD movie that features Extras:
    On your Apple TV, select Movies, then select your movie to see the Extras menu. Extras aren't available from the Computer tile on Apple TV (Home Sharing).
    On your Mac or PC, open iTunes and go to the Movies section in your iTunes library. Double-click your movie. If there's no Internet connection, the Extras menu will be skipped. The movie will immediately play if you already downloaded it.
    On your iPhone, iPad, or iPod touch, tap the Videos app, then tap your movie. If you're connected to the Internet via Wi-Fi, the Extras menu will appear.

  • I did erase app store by mistake and i can't undo it and I'm trying to reinstall osx but can't find a link

    i did erase app store by mistake and i can't undo it and I'm trying to reinstall osx but can't find a link

    10.3 does not have the App Store available.      Go to Apple menu -> About This Mac and the following will bring it back depending on what you have:
    Any version of 10.6, use the 10.6.8 Combo Update:
    Combo v1.1 (7/25/2011)
    Any version of 10.7, use the 10.7.5 Combo Update: 10.7.5 Combo
    Any version of 10.8, use the 10.8.5 Combo Update: 10.8.5 Combo
    Any version of 10.9, use the 10.9.2 Combo Update: 10.9.2 Combo
    Note, if you it does not bring it back, you may need to run the combo keys of command-R on boot restore if you have 10.7 or later, and then the appropriate Combo update.    If you have 10.6.8 or earlier, command-R restore is not available, and you need to either use the original 10.6 installer disc, if the Mac is newer than March 15, 2010, or the 10.6.3 retail disc found here for 10.6 compatible Macs that are older (that includes any Intel CPU Mac with at least 1 GB of RAM):
    10.6 retail is available from the Apple Store on http://store.apple.com/us/product/MC573/mac-os-x-106-snow-leopard (the /us/ in the link may be changed for the standard two letter country code matching the store link). 
    If you are using a PowerPC Mac, G3, G4, or G5 you can't install 10.6, or the App Store.
    Those using 10.6.8 or earlier, do not jump to 10.7 or later, without reading this tip first:
    https://discussions.apple.com/docs/DOC-6271

  • I had a link to Foxtab 1.4.5 which WORKS with Firefox 5, and I made the mistake of installing Firefox 6 Beta and it (Foxtab is no longer working. So, I re-installed Firefox 5 but I can't find the link to Foxtab 1.4.5. Help!!!!!

    There was a link to a site which had a version of Foxtab (1.4.5) which actually WORKS with Firefox 5. I can't find it now, so if someone knows of this link, I would appreciate getting it.

    Try this:
    [[https://addons.mozilla.org/en-US/firefox/addon/foxtab/]]
    If this solves your problem please say this is solved.

  • By mistake I have changed the password using iChain but the website still utilises the old password that iChain originally created. How can I find out the original password that was created?

    I created a password using iChain whilst on a website where I have an account. For some reason, I needed to change the password and it seems that the website can only be accessed using the original chain password. I do not have a record of it and it is not in my iChain password list. Can I find what historical passwords were used?

    i am also have the same thing how can i get they out from my game center ?

  • Can't find iPhone 4 I deleted my Find my iPhone by mistake don't no how to get back on find my iPhone list

    I had my iPhone 5 on and I can't find my wife's iPhone 4 sighn to block it I deleted here name of my find my iPhone list don't no what to do Don't no if any one use it , been off and the 3G went faulty I'm at my ends whits Plz help me

    Try this...
    Reset your Home screen to the default layout:
    Choose Settings > General > Reset and tap Reset Home Screen Layout.
    iPhone User Guide
    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf

  • Imported photo's from computer, via Itunes, to iphone, now itunes can't find the folder with original pictures from Iphone or doesn't recognize it.

    Dear reader,
    i just bought a new Iphone 5s, and decided to download Itunes and sync my Iphone with my laptop. Everyting went well until i decided to try out some things and i imported pictures via Itunes from laptop to Iphone. this is how i did it: Itunes - iphone - pictures - pictures synchronized from 'option choose map' - I chose another map - after, i 'ticked' box 'all maps'. Then i hit the button 'synchronize'. I forgot to look how the orignal map was called and this was the one Itunes syncronised autmatically with, that one also contaned all the original pictures on my Iphone. So, after putting some new photo's on my Iphone, i wanted to change the settings back to normal so my Itunes and Iphone could sync iphone pictures again. But I can't find the old map back or Itunes doesn't recognize the map. I already tried to use the map 'Ipod Photo Cache' but it shows only empty folders. I also tried computer - iphone - Internal storage or DCIM or 860OKMZO; No idea what that means but i thought that the last two folders can contain pictures. However, i get an error if select these ones a map in Itunes. How do I get back to the old settings again?
    I hope I described the problem well; English is not my native language so i'm sure this might contain grammar mistakes.
    A big 'thank you' for helping me in advance!

    When i connected the iphone to my laptop, i found the location of the pictures on the iphone; the a map called  '860OKMZO' (i've mentioned this map earlier, this folder is located inside the folder DCIM). But if i try to open it with Itunes, this error comes up: 'foldername is invalid'. I figured that Itunes could have saved the synchronised pictures in another map somewhere else but i've found nothing... 

  • Where can I find a tutorial about...

    I'm new to Flash CS3 and need some help...please.
    Where can I find a tutorial on how to customize a scroll box?
    I made one, but the pictures that are going inside, they are
    not center, I can only see, the bottom part of them.
    Thanks

    You wrote, "So if you moved the files, what you need to do is move them back..."
    I don't know how to do this. Could you tell  me how. I moved about 50 photos into the Organizer. Now I know I should not have done this. I'd like to correct the mistake.
    When I click on the Show Folder List icon this is what I see:
    My Pictures
         Pictures
              Faces
                   Clowns
         My Videos
         Computer
                   C:
                   Program Data
                   Users
                        Tommy
                              Faces
                                   Dancing
                                   Faces
                                   Lovers
                                   Racing
                                   Tommy
                         Pictures
                  D
                  E
                  F
                  G
    This makes no sense to me. But I could live with it - except perhaps something I did has made my PrE11 impossible to work with. When I put new clips via the memory card into the program, they do not go into the Timeline. All I get is an error message.
    I like the Adobe programs and don't want to give up on them, especially since my problems probably have been self-imposed.

  • How can I find iweb domain files?

    Hi everyone.  I'm in a bit of a state!  I built a fairlybig website with iweb 1 - http://www.lakesweddingmusic.com - on my old Macbook (10.4.11) which died a few months ago.  I now have a Macbook Pro(10.8.2) and have imported iweb 3.0.2 (I think that's the version) from an iLife '11 disc, along with iDVD.  I tried the newly imported iweb 3 and it worked well. However, my mistake was to test it out:  I opened a new file from a template and called it 'blank'. Now I want to get rid of this test file and load up my already created website -lakesweddingmusic.com.  However, now that I've traced my old Domain files on my old Mac's hardrive, which fortunately, was left intact after the rest of the computer died, I can't get rid of this test file I created.  My problem is I can't find the new domain file that I created in order to test out iWeb 3.  If I delete the file in iWeb, iWeb won't close and neither will the mac Pro close, unless I do a 'start button shut down', which seems to be the only way to close iWeb when there are no files in it.  Then , when I reboot and open iweb, up comes the test file which I deleted!  So it's got to be somewhere on my new Mac.  I've searched Users/Me/Library/Application Support - but the only iweb folder there is the one I created which houses the Domain file which I copied from my old Macbook hard drive!  I've tried searching for 'domain' but only get the file with my website on it.  I simp[ly cannot find or get rid of this new file.  Any suggestions as to where it might be hiding would be most welcome.

    In Lion and Mountain Lion the Home/Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.
    To open your domain file in Lion or Mountain Lion or to switch between multiple domain files Cyclosaurus has provided us with the following script that you can make into an Applescript application with Script Editor. Open Script Editor, copy and paste the script below into Script Editor's window and save as an application.
    do shell script "/usr/bin/defaults write com.apple.iWeb iWebDefaultsDocumentPath -boolean no"delay 1
    tell application "iWeb" to activate
    You can download an already compiled version with this link: iWeb Switch Domain.
    Just launch the application, find and select the domain file in your Home/Library/Application Support/iWeb folder that you want to open and it will open with iWeb. It modifies the iWeb preference file each time it's launched so one can switch between domain files.
    WARNING: iWeb Switch Domain will overwrite an existing Domain.sites2 file if you select to create a new domain in the same folder.  So rename your domain files once they've been created to something other than the default name.
    OT

  • Java.lang.UnsatisfiedLinkError: D:\...*dll: Can't find dependent libraries

    Hello,
    Every time I try run my application I get this:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\Java_przyklady\Met
    ody_macierzyste\HelloNative.dll: Can't find dependent libraries
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
    at java.lang.Runtime.loadLibrary0(Runtime.java:788)
    at java.lang.System.loadLibrary(System.java:834)
    at HelloNative.<clinit>(HelloNative.java:12)
    at HelloNativeTest.main(HelloNativeTest.java:10)
    This application is example which was provided with book- Core Java 2
    Here is exactly what I have:
    HelloNative.java
    class HelloNative
       public static native void greeting();
       static
          System.loadLibrary("HelloNative");
    }HelloNativeTest.java
    class HelloNativeTest
       public static void main(String[] args)
           HelloNative.greeting();
    }Here is my HelloNative.c
    #include "HelloNative.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL Java_HelloNative_greeting(JNIEnv* env,
       jclass cl)
       printf("Hello world!\n");
    }and HelloNative.h
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class HelloNative */
    #ifndef _Included_HelloNative
    #define _Included_HelloNative
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class:     HelloNative
    * Method:    greeting
    * Signature: ()V
    JNIEXPORT void JNICALL Java_HelloNative_greeting
      (JNIEnv *, jclass);
    #ifdef __cplusplus
    #endif
    #endifI did:
    javac HelloNative.java (I got HelloNative.class)
    javah HelloNative (I got HelloNative.h)
    gcc -c -D__int64="long long" -Ic:\j2sdk1.4.2\include\ -Ic:\j2sdk1.4.2\include\win32 HelloNative.c (I got HelloNative.o)
    dllwrap --add-stdcall-alias -o HelloNative.dll HelloNative.obut here I got:
    dllwrap: no export definition file provided
    Creating one, but that may not by what you wantand
    HelloNative.dll
    May by I made mistake used dllwrap, what this feedback means for me?
    So, when I did everything what I wrote abow I got:
    HelloNative.class
    HelloNative.h
    HelloNative.o
    HelloNative.dll
    and I run
    HelloNativeTest.class and I got above Error
    I use j2sdk1.4.2 and Windows XP
    Could anybody tell me what I did wrong???
    I will be appreciate

    The "Native Methods" forum is for JNI questions.
    See this thread...
    http://forum.java.sun.com/thread.jspa?forumID=52&threadID=534964

Maybe you are looking for