What am I missing exactly?

Hello everyone, so I have coded this a couple of different ways and I am looking for the most efficient way of doing this (I'm new to PS so please bear with my incompetence -- I am going through PS training so one day I will be answering questions rather
than asking them :) )
Essentially I need to be able to recurse a directory and log all files to a txt document when matched against an array. My code currently looks like this, however, it's not returning any results:
$audioFileExtensions = @(".aac",".aif",".aiff",".asf",".asx",".au",".avi",".flac",".m3u",".m4a",".mid",".midi",".mov",".mp1",".mp2",".mp3",".mp4",".mpa",".mpe",".mpeg2",".mpeg3",".mpg",".ogg",".qt",".qtw",".ram",".rm",".mi",".mvb",".snd",".swf",".vob",".wav",".wax",".wma",".wmv",".wvx")
Get-ChildItem -Path \\MHT-FS1\UserHomeDrives -Recurse | Where-Object {$_.Extension -contains $audioFileExtensions} | Select-Object FullName > C:\audioFileResults.txt
I've also created a forEach statement and although this works, it seems to be very inefficient and slow as it is looping through each item in the array and performing the recursive GCI method. 
How would I best write this code to produce the results I am looking for in the most efficient manner?
Thanks in advance!
Cheers,
G-

Listen,
Your question tells everyone you are ignorant in PowerShell, because the solution is quite simple.
You declare yourself completely ignorant in REGEX, even though you suggest me to look into his REGEX example - don't you think you're to naive and stupid suggesting something you don't understand?
Look at his REGEX example: it's an abusive use of REGEX, because it' unnecessary! PowerShell will automatically convert it back to
string! 
And you dare to suggest me code from this rubbishell coder, after I posted almost 20 reasons why his code is rubbishel!
You should just shut your mouth up and cross your hands to not expose your low IQ and retarded mental maturity, thinking you are someone capable of suggesting anything to anyone (let alone about REGEX that I know more you and him together).
The fact that you posted in favor of him and against me, just shows you are one more idiot joining the rubbishell coders brotherhood!
Next time you think to advise someone, ask your parents first, or your brothers, sisters, husbands and wifes, and they'll tell you: '' hey little kid, it's not your business, so keep your huge curvy S out of this. ''
I suppose if I had the attitude you have I wouldn't have any friends; I say that because I've trolled your posts just because I was curious if you were really so cynical and as it turns out, you seem to make more enemies than friends. I'm really not
too sure why you feel it necessary to teach in such a mean-spirited way. Seriously, man, you're a smart dude act like one. Calling people idiots, stupid, ignorant (although I understand the English meaning of ignorant, it's not something you call people) and
the like... you will go no where in life no matter how smart you think you are. When you start putting yourself above others by degrading them, the only thing you are doing is putting yourself beneath them and you lose effectiveness with those you are trying
to teach. Once you lose effectiveness, you've lost communication. Once you've lost communication no one wants or has the desire to listen to you or your way of doing things any longer.
You can call me anything you want, I do not know you and I will not lose any sleep over your comments. I only wish I could get through to you so that maybe you can succeed in building relationships rather than destroying them. You may be smart, however, that
smart brain does not match your nasty behavior towards others. You may want to think about building your interpersonal skills rather than your PowerShell/coding skills; I can guarantee your personal skills will get you much further than your coding skills.
You're behavior seems to match that of a school yard bully and no one likes a bully.
Think about it. Think why are people so against me? What am I saying that offends them? How can I get people to like me and how can I spread my knowledge in a more effective way? How do I win friends and influence people? There's a book authored by
Dale Carnegie titled exactly that: "How to Win Friends and Influence People", perhaps you could take some time to read it and learn from it just as you read and learn from the help files associated with your preferred coding language.
Just a suggestion from one human to another and in no way insulting. You'll make the forums a much more pleasant place to come ask for help and learn from others -- such as yourself.
And last but not least... You were not born into PowerShell or coding, you began as a clean slate -- nothing on it, therefore, you had to learn through experience. Give people a break by easing up on them, no one knows as much as we all do. "Who am
I to tell you anything?" you once asked... well, I am someone, probably the only one here, that has your best interest in mind. Be kind to people.

Similar Messages

  • CSS experts, please show me what I'm missing... [SOLVED]

    I want to know how Firefox knows the difference between certain code surrounding Arch's stuff. For instance, the time and date stamp above every post here. This is an example:
    <h2><span><span class="conr">#1 </span><a href="viewtopic.php?pid=674509#p674509">2009-12-19 12:26:19</a></span></h2>
    and from the wiki:
    <a name="Getting_Started" id="Getting_Started"></a><h2> <span class="mw-headline"><a href="/index.php/Getting_Started" title="Getting Started">Getting Started</a></span></h2>
    Both of these pick up on the h2 settings I have in a CSS file that I'm putting together:
    h1,h2 {
    font-family:"DejaVu Sans" !important;
    font-weight:bold !important;
    font-size:14px !important;
    Firefox doesn't apply the bold settings to the first example but does to the second. This is exactly what I want. If I add another entry:
    h2 span {
    font-family:"DejaVu Sans" !important;
    font-weight:normal !important;
    font-size:13px !important;
    Then the bold goes off on both of them. I want a generic CSS file that has the time and date normal and the wiki entries bold. Firefox does this automatically. What am I missing?
    ... be back in 20 hours ...

    Mh, I'm sure you know about the tree structure of HTML. Please excuse if tell you things you already know, but allow me to talk about how CSS rules are applied.
    <h2>
    <span>
    <span class="conr">#1 </span>
    <a href="viewtopic.php?pid=674509#p674509">2009-12-19 12:26:19</a>
    </span>
    </h2>
    What CSS does is applying the CSS rules for each element/selector. This means first it will apply the rules for h2, then the rules for span and at last the rules for the class conr or the element a respectively. If any properties already exists, they will be overwritten when applying the rules of a more specific element. If multiple rules apply (for instance multiple classes with conflicting properties), the !important will help the browser to decide which rule to apply.
    In your case I guess that there are rules for the class conr or the span element which conflict with your desired setting. Since you only change the rules for h2, the rules of those more inner elements/attributes take precedence.

  • HT1451 I am trying to restore my playlists that disappeared yesterday. I have followed these instructions but when I get to step 7, I can't find File Library Import playlist. What am I missing?

    I am trying to restore my playlists that disappeared yesterday. I have followed the instrutions on the support page but when I get to step 7, I can't find File>Library>Import Playlists. What am I missing?

    I suspect the menus have changeed slightly since that document was written...
    Empty/corrupt library after upgrade/crash
    Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping.  Note that in iTunes 11 an "empty" library may show your past purchases with links to stream or download them.
    In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
    Alternatively, depending on exactly when and why the library went missing, there may be a more recent .tmp file in the main iTunes folder that can be copied & renamed as iTunes Library.itl to restore the library to an earlier state. Look for a recent .tmp file that is similar in size to the .itl files in the Previous iTunes Libraries folder. If it has happened repeatedly you may want the earliest such file generated since the last iTunes upgrade.
    If applicable, see iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
    When you get it all working make a backup!
    Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device.
    I've noticed more of these missing library posts of late and a common factor to most since I started asking is AVG Anti-Virus. It seems in some cases it might be at least part of the reason why the library file disappears. Try excluding the iTunes folder from any AV scanning process.
    tt2

  • Note 3 won't answer a call by using the "answer" voice command. Other voice commands work fine (ie 'volume up') and speech to text works fine. Tried it in the car and in a quiet room at home. What am I missing?

    Note 3 won't answer a call by using the "answer" voice command. Other voice commands work fine (ie 'volume up') and speech to text works fine. Tried it in the car and in a quiet room at home. What am I missing?

        Rodilator,
    We'll figure this out together! Can you please walk us through the exact steps you're taking to answer a call when it comes in?
    SarahO_VZW
    Follow us on Twitter @VZWSupport

  • "What U Hear" Missing in Win7

    '"What U Hear" Missing in Win7? I have two separate Sound Blaster X-FI Extreme Audio soundcards (though of different makes) and the same issue with both? - ever since upgrading to Windows 7 neither card, after properly installed and with latest driver installed, will display "What U hear" in my audio stack.
    A point of clarrification on the cards:
    One is a PCI SB0790, the other however is manufactured by MSI, and is a PCIe MS 432, but still bears the creative labs logo, as well as the X-FI Extreme Audio product name and it also has a driver put out by Creative labs so it should still be valid to bring up here.
    I've run through a few tutorials I found online such as <a rel="nofollow" href="http://www.sevenforums.com/tutorials/20595-what-u-hear-recording-enable.html"]http://www.sevenforums.com/tutorials/20595-what-u-hear-recording-enable.html[/url] but to no avail - neither "What U Hear" or "Stero Mixer" show up in the list of available recording devices. Prior to installing Win7 I was primarily using the MSI card and "What U Hear" was indeed available in my audio stack.
    Any suggestions?

    +Re: "What U Hear" Missing in Win7G ?
    Agreed! I have an X-FI Extreme, upgraded to win 7, installed the latest audio drivers, and have just spent the last 2 hours trying to get my "what u hear" back without any luck at all.
    I'll also mention that "disabled devices" are shown in the recording options, so that is not the issue.
    I was using vista before with the exact same hardware and "what u hear" was available. The driver version was 5.2..200 dated 4/02/07 ... The current driver for windows-7 is 5.2..208 dated 3/08/2009. Maybe installing an older driver would do the trick? I don't know if that would work as I haven't been able to find the old driver I was using for download (just been bombarded with broken links). I'm also guessing that you'll be held hostage to the latest drivers in windows 7.
    Get the latest drivers to lose functionality? Sounds like something apple would pull on you!
    If anyone has a solution for this, please let us know, otherwise I'll be rolling all the way back to good old XP again.

  • What am I missing with VPN enforcement?

    I'm making sense of how to implement the VPN Enforcement feature and would like to hear from others who have set it up.
    The way I understand it to work is this...
    User connects to the internet (eg with a laptop using a 3G card). Once it detects the internet connection, it switches to the Location specified in the "Switch To" setting on the VPN Enforcement page.
    And I have it prompting to connect to the VPN client at this point.
    What is puzzling me is... what's the point?
    It doesn't seem to make a difference whether the user connects to the VPN or not. The Location in the Switch To setting can have certain restrictions but once connected to the VPN, the Location doesn't change. So, before or after connection to the VPN the same restrictions are in place.
    Perhaps I'm missing something in the way this is meant to work.
    How has anyone else set this up?
    Ideally what I want to happen is....
    User connects to the internet - so has enough restrictions (or un-restrictions) to allow this. This would include connecting at an airport or hotel where you connect via a web page. Usually this would be with a 3G modem
    then the user is forced to connect to their VPN (in our case we have a dongle and log in. So, I can cause the login screen to appear on VPN switching)
    Only allow internet access as long as the VPN is connected. And block access if it is not.
    Any thoughts are happily received, thanks
    Alison

    Here is a brief description of what needs to be done in order for VPN Enforcement to work.
    1) The "Unknown" location should have a "stateful" firewall assigned. This allows the endpoint to see all APs and also authenticate to them.
    2) The VPN Location should have an "all closed" firewall. This location will be used to switch to once the endpoint gains internet connection (the ZSC checks this automatically). You have to setup a single ACL rule
    that points to the IP address of your VPN concentrator (so now the only accessible service/device is the VPN)
    3) In the "VPN Enforcement" settings, enter the IP address of the VPN concentrator, the trigger location (at a minimum this is the Unknown), and "Switch to" locations (this is the location you set up in step 2)
    5) Again, in "VPN Enforcement" configure the settings needed to make your VPN client to connect "automagically" to the VPN concentrator (client path, and optionally any arguments).
    Please note that internet connectivity triggers the enforcement. If someone connects to an AP or wired network that requires authentication (such as you see at a coffee house or hotel), then the Internet connectivity fails.
    Hope this clarifies,
    Daniel
    >>>
    From: AWhitwood<[email protected]>
    To:novell.support.zenworks.endpoint-security-management
    Date: 7/8/2009 10:06 PM
    Subject: Re: What am I missing with VPN enforcement?
    Excellent - thanks Indy
    That is pretty much the same as what I'm setting up. Would you mind
    expanding on how you've set this up....I've put your original comments
    in blue
    1) Users log in and change their location to 'Wired/Wireless/3G'.
    I know our users won't manually switch Locations themselves.
    I've got this set up to detect the Unknown location which is anything
    that is away from the office wired network.
    2) Once they have connected to a secure wifi hotspot or their vodafone
    3g dongle is connected the location automatically switches to 'Secure
    VPN'.
    Once they are on the internet, ourLcoation does switch from
    "Unknown" to "Away from the Office" (or "VPN" in your system). Can I
    ask you what your Firewall settings are on your VPN location? Are there
    any restrictions? eg I had it All Blocked but of course it stopped it
    connecting the VPN client so I've now got it set to All Stateful.
    3) After a few seconds the Cisco VPN Client automatically loads and the
    user has to connect via that to get internet connectivity otherwise they
    get nothing.
    I have this too - the client VPN launches and the user is prompted
    to login. But what if they don't? what stops the internet working for
    them if they didn't log in? When you say "otherwise they get nothing" -
    what is it that prevents them getting to the internet if they have not
    connected to the VPN. This is exactly what I'm trying to set up so I'm
    very happy to hear that you've done it. What is puzzling me is how to
    have it blocking internet access unless it is through the VPN.
    I think its purpose is to make sure all internet traffic goes through
    your VPN and firewalls, settings, etc etc...
    Exactly what I want ! Thanks - I've just got to figure out how to
    do it.
    Hope that helps,
    That helped a lot.
    Alison
    AWhitwood
    AWhitwood's Profile: http://forums.novell.com/member.php?userid=4390
    View this thread: http://forums.novell.com/showthread.php?t=379389

  • HT202731 HAVE MACBOOK AIR, purchased external DVD.  Will not operate.  On screen "No support disc available.  ???  What am I missing????

    Have Macbook Air, I purchased DVD external.  Will not function, will not eject disc.  On screen " no support disc."  What am I missing?

    Hi drhdrh,
    I apologize, I'm a bit unclear on the exact nature of your configuration. If you are using an external SuperDrive with your MacBook Air, you may find the information and troubleshooting steps outlined in the following article helpful:
    Get help with the slot-loading SuperDrive on your Mac computer - Apple Support
    Regards,
    - Brenden

  • Is anyone out there finding OSX Lion a disappointment compared to previous Mac OS?  After nearly 20 yrs of using and enthusing about AppleMac, I am suddenly not enthused.  What am I missing?

    Is anyone out there finding OSX Lion a disappointment compared to previous Mac OS?  After nearly 20 yrs of using and enthusing about AppleMac, I am suddenly not enthused.  What am I missing?

    You're not heavy on specifics on what you don't like.
    Most people have little technical expertise but are wanting more and more, requiring more complex computers, ideally ending up with one from Star Trek where you basically don't have to know anything how to really use a computer and it just provides you with the exact answer you need to a not particularly well-phrased query.  If you're missing things like configuration options and the rest, well frankly I think many people are happy not to have to make complicated decisions for themselves such as in which opening do they insert a system installer disc.

  • I want to use wifi for Apple TV, but it doesn't prompt for a password, so never connects.  What am I missing?  Can I only use it via a non-password-protected wifi connection?

    I want to use wifi for Apple TV, but it doesn't prompt for a password, so never connects.  What am I missing?  Can I only use it via a non-password-protected wifi connection?

    Hi - you might want to post this question on the Apple TV area - you would probably get a quicker response - if you have a specific question relating to Apple routers then post back here

  • IPhone 5s doesn't ring and goes directly to voice mail. Do not disturb is disabled. Have reset network settings and did a hard reset.  What am I missing?

    iPhone 5s doesn't ring and goes directly to voice mail. Do not disturb is disabled. Have reset network settings and did a hard reset.  What am I missing?

    Call your phone carrier - that's a problem for them to resolve.

  • I would like to be able to edit MP4s in CS5.  I can not open the file. What am I missing?

    I would like to be able to edit MP4s in CS5.  I can not open the file. What am I missing?

    According to the publisher For GoSystem Tax, the 32-bit version of Internet Explorer 8, 9, or 10 is required.  Which means it can't be accessed from an iPad.  This seems weird.  I would recommend you contact the publisher.

  • HT1209 My Itunes Library and iPhone have fallen out of sync on music over the yearsare - how can I compare my itunes library with my Iphone  to see what songs are missing from my library so I can then bring my Library up to date

    My Itunes Library and iPhone have fallen out of sync on music over the yearsare - how can I compare my itunes library with my Iphone  to see what songs are missing from my library so I can then bring my Library up to date

    Hello Solid Buck,
    Thank you so much for providing the details about the duplicate song issue you are experiencing.  It sounds like you would like to remove the duplicate songs that will not play on your iPhone, but when you connect it to iTunes, iTunes only shows you one copy of the song on your iPhone. 
    In this situation, I recommend deleting the individual songs that do not play directly from your iPhone.  I found the steps to do this on page 61 of the iPhone User Guide (http://manuals.info.apple.com/en_US/iphone_user_guide.pdf):
    Delete a song from iPhone: In Songs, swipe the song, then tap Delete.
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • No Mirroring in Ipad 2? I have IPAD2 and Apple Tv 4.3. I can airplay videos/music from Ipad2 to my HDTV via ATV, but I cant mirror it. When I select airplay to switch from Ipad2 to Apple TV, Mirroring does not show as an option. What am I missing?

    No Mirroring in Ipad 2?
    I have IPAD2 and Apple Tv 4.3. I can airplay videos/music from Ipad2 to my HDTV via ATV, but I cant mirror it. When I select airplay to switch from Ipad2 to Apple TV, Mirroring does not show as an option. What am I missing?

    That feature is not yet available, it is coming with IOS 5
    http://www.apple.com/ca/ios/ios5/features.html

  • In iTunes 10, I could type "Sinatra" in the search file, and would get a list of all tracks with "Sinatra" in any field.   In iTunes 11 I get these clever little windows, with nice arrows, but no lists to view.   What am I missing?

    In iTunes 10, I could type "Sinatra" in the search file, and would get a list of all tracks with "Sinatra" in any field.   In iTunes 11 I get these clever little windows, with nice arrows, but no lists to view.   What am I missing?

    Thanks for chipping in.   I discovered something after trying what you suggested.   I have quite a few collections of hits by year from Time Life and Billboard.  I've eliminated duplicate tracks that appear in both collections (or other CDs for that matter), but cross-reference the CD where I deleted the track and placed in in the comments section of the CD track I retained.   If I "search" by song name, only the remaining track appears.   But if I want to hear for example Classic Rock 1964, only those tracks remaining would be there when I pull up that CD.   So, I type "Classic Rock 1964,"  in the search field.  First the boxes on the right of the screen open up showing album icons.  Showing four tracks by album with a button to view 10 more, then four songs with an option to vies 18 more.   I finally noticed that at the top of the boxes is a blue band that reads, :Show Classic Rock 1964 in Music.  When I double click on this blue band, all 24 tracks from the original CD appear in the song list format even though I had deleted two of them because they appeard in a Beach Boys CD.   On those tracks, I had referenced Classic Rock 1964 in the comments field.    So, bottom line, Search will also look in the comments field if you click "filter by all" in the magnifying glass to the left of the search field.   And you can move all tracks that if finds into a song list by double clicking on the blue band.

  • How to tell what fonts are missing in a Photosohp CS5 document?

    Hello!  I have received some work from a graphic designer.  I need to modify some of the text in the document.  When I open the document I get an error message:
    Some text layers might need to be updated before they can be used for vector based output.  Do you want to update these layers now?  [Update] [No]
    If I click [Update] it replaces the font with Myriad Pro.  If I click [No] the text looks the way the designer intended, but I have the exclamation mark-triangle symbol over the layer with the text.  If I try to edit the text I get another warning:
    Editing or rendering the text layer "Text Layer" will cause its layout to change.  Continue?  [Cancel]  [OK]
    The same behavior described above occurs.  If I click [Cancel] I obviously can't edit the text.  If I click [OK] it changes the font to Myriad Pro.
    I would like to determine what font the layer is using.  I could swear that previous versions of Photoshop would tell me what fonts were missing when I opened a document.  I can't use the text tool to select the text without it changing the font.  Other posts have mentioned using the text tool to look at the text drop-down to find a greyed-out font which indicates the missing font.  I do not have that.  I only have perhaps 200 fonts installed.  Can anyone tell me how to determine what fonts a .PSD document is using?  I would prefer not to bug the graphic designer if possible.  Thanks much!
    ~ Dan

    Not sure why you are getting ""Font is present on the system but requires a layout change.", usually you do not get that instead the name of the font shows.
    We use extensis Universal Type Client, so the fonts load automatically upon opening files, and never really get missing fonts in Photoshop.
    Actually fontbook has auto font loading if you want to give that a try. Fontbook >> Preferences

Maybe you are looking for