Powershell Filter Help

Hi, i have an log file and i try to filter the results but the filter i use doesn't seem to work and i don't know why.. :(
The log has 2 properties, failures and date-time
I want to get all the logs which failure names are like '*denied*' -or  '*error*' and also which date-time is within the last 80 minutes.
So i try with:
$timeframe = (get-date).AddMinutes(-80)
$log | ? { $_.failures -like '*Denied*' -or $_.failures -like '*error*' -and $_.'date-time' -ge $timeframe }
 It shows correctly the errors which name are like above, but the times of those errors are wrong..
If my current $timeframe is : Friday, January 16, 2015 9:18:11 AM
The script displays failures with time like:
date-time                                                                        
2015-01-16T07:07:00.632Z                                                                    
2015-01-16T07:09:07.742Z                                                                    
2015-01-16T07:09:56.071Z                                                                    
2015-01-16T07:11:38.454Z                                                                    
2015-01-16T07:11:47.455Z                                                                    
2015-01-16T07:28:27.344Z                                                                    
2015-01-16T07:28:30.246Z                                                                    
2015-01-16T07:36:28.669Z                                                                    
2015-01-16T07:36:30.058Z                                                                    
2015-01-16T07:36:47.920Z                                                                    
2015-01-16T08:18:53.571Z                                                                    
2015-01-16T08:32:34.531Z                                                                    
2015-01-16T08:32:34.547Z                                                                    
2015-01-16T08:40:47.401Z                                                                    
2015-01-16T09:00:37.766Z                                                                    
2015-01-16T09:14:46.396Z                                                                    
2015-01-16T09:35:29.428Z                                                                    
2015-01-16T09:35:32.782Z                                                                    
2015-01-16T09:35:32.798Z                                                                    
2015-01-16T09:54:47.985Z                                                                    
2015-01-16T09:54:48.016Z 
But it should display the errros which time are over 9:18..
What is wrong with my Filter?
I also tried with:
$log | ? { (($_.failures -like '*denied*' -or $_.failures -like '*error*' ) -and ($_.'date-time' -ge $timeframe)) }
But i got the same result..
Can anyone help?
Thanks

Not enough information in the question to know for sure, but I suspect you're doing a string comparison.  Try casting your log timestamp to [datatime]:
$timeframe = (get-date).AddMinutes(-80)
$log | ? { $_.failures -like '*Denied*' -or $_.failures -like '*error*' -and [datetime]$_.'date-time' -ge $timeframe }
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

Similar Messages

  • PowerShell Scripting help to combine two scripts

    I have a script that helps automate virtual server builds.  The script creates a specification document which is used to perform the actual builds.
    # Spec-And-Build.ps1 - Loops through a directory and performs an
    # end to end specification generation and build on each request in that directory
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory=$true)]
        [string]$RequestDir,
        [Parameter(Mandatory=$true)]
        [string]$SpecDir,
        [Parameter(Mandatory=$false)]
        [pscredential]$Credential_CPR,
        [Parameter(Mandatory=$false)]
        [pscredential]$Credential_VDC,
        [Parameter(Mandatory=$false)]
        [pscredential]$Credential_Admin
    if (!$Credential_CPR) {
        $Credential_CPR = Get-Credential -Message "CPR Domain Credentials."
        if (!$Credential_CPR.UserName.ToUpper().StartsWith("CPR\")) {
            $Credential_CPR = New-Object pscredential(
                ("CPR\" + $Credential_CPR.UserName), $Credential_CPR.Password)
    if (!$Credential_VDC) {
        $Credential_VDC = Get-Credential -Message "VDC Domain Credentials."
        if (!$Credential_VDC.UserName.ToUpper().StartsWith("VDC\")) {
            $Credential_VDC = New-Object pscredential( `
                ("VDC\" + $Credential_VDC.UserName), $Credential_VDC.Password)
    if (!$Credential_Admin) {
        $Credential_Admin = Get-Credential -UserName "Administrator or root" `
            -Message "Enter the Administrator or root password for the new VM. The user name here will be ignored"
    .\Gen-VMSpec-Many.ps1 -RequestDir $RequestDir -SpecDir $SpecDir -Credential_VDC $Credential_VDC
    $caption = "Continue Build"
    $message = "Please validate the generated specification files in $SpecDir - Then click Continue to start build"
    $opContinue = new-Object System.Management.Automation.Host.ChoiceDescription "&Continue","help"
    $opAbort = new-Object System.Management.Automation.Host.ChoiceDescription "&Abort","help"
    $choices = [System.Management.Automation.Host.ChoiceDescription[]]($opContinue,$opAbort)
    $answer = $host.ui.PromptForChoice($caption,$message,$choices,0)
    if ($answer -eq 0) {
        .\Build-VM-Many.ps1 -SpecDir $SpecDir -Credential_CPR $Credential_CPR -Credential_VDC $Credential_VDC -Credential_Admin $Credential_Admin
    } else {
        Write-Host "Build step aborted, run Build-VM-Many.ps1 manually to continue."
    This script works well.  Now I need to add a section that adds Active Directory groups to the built servers from the spec document.  I found this script which also works well:
    # Create local group on the local or a remote computer 
    Write-Host -foregroundcolor Yellow 'Admin Privileges Required!' 
    $computerName = Read-Host 'Enter computer name or press <Enter> for localhost' 
    $localGroupName = Read-Host 'Enter local group name' 
    $description = Read-Host 'Enter description for new local group' 
    if ($computerName -eq "") {$computerName = "$env:computername"} 
    if([ADSI]::Exists("WinNT://$computerName,computer")) { 
        $computer = [ADSI]"WinNT://$computerName,computer" 
        $localGroup = $computer.Create("group",$localGroupName) 
        $localGroup.SetInfo() 
        $localGroup.description = [string]$description 
        $localGroup.SetInfo() 
    My question is, how do I make one script from the two?  I am very new to PowerShell scripting.

    Here are the instructions on how to use PowerShell:
    http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
    Your question is vague and is asking for someone to do this for you.  It is better if you do it yourself and post back with specific questions.
    In the end you have to write and debug the scripts. We will not do this for you but we will answer questions.
    ¯\_(ツ)_/¯

  • New to Powershell - Please Help

    In short - I believe Powershell can achieve what is needed but I'm not sure how to compile the script. 
    I have roughly 2k directories including multiple levels of subdirectories. I would like to achieve the following:
    1. Identify all directories with 4 files or less within.
    2. Move found files to a directory "c:\DumpDir".
    3. "Cleanup" Delete all empty directories.
    4. Print report "not required" just a desire.
    After 4hrs of research I've only been able to come up with the identification piece, but when I try to include the move function things get odd. I finally admitted defeat and thought it best to seek help.
    "(gci C:\bends\ -r | ? {$_.PSIsContainer -eq $True}) | ? {$_.GetFiles().Count -eq 4} | select FullName"
    Thank you,
    Chris

    You are getting directories but you want to move files. Use the directory  to call the Get-ChildItem with the directory name:
    Get-ChildItem C:\temp -Directory -Recurse |
    Where {$_.GetFiles().Count -eq 4} |
    Get-ChildItem -File |
    Move-Item -Destination c:\temp -WhatIf
    ¯\_(ツ)_/¯

  • Report filter help

    Dear all,
    I’ve been given a requirement to develop a simple report “to query PO data where PO creation date = Inv Posting date”
    The cubes are available and in the cubes we have the PO creation date and Inv posting date as dimension.
    Question is, without changing the dimension and by using the existing cubes, how can I restrict my data just by using the query builder to filter reports and I want my filter to be something like “where 0DOC_DATE = 0PSTG_DATE”
    Thanks in advance.

    SCHT,
    a simple way would be :
    create a formula variable on both the dates and find the difference between tem using a CKF.
    now havea condition for showing rows only where the difference is zero..
    Arun
    Assign points if it helps..

  • Lowpass filter help for thermocouple reading

    Hello
    I have an old legacy E-Series AI-16SE 12bit 500KHz PCI card.
    I am attempting to setup a temperature reading test program. I will have the E-Series connected to a SCB-68, which will have five T type thermocouples connected. I realize this is not the best test setup but it is an attempt at a quick setup on a bench so hopefully any noise interferance will be minimal.
    I will be using LV 8.2 professional development.
    I was wondering if I setup a software based lowpass filter if that would be helpful in this situation?
    If so can someone show an example the has a cutoff freq for 2Hz? I am unfamilular with all the settings of the lowpass filter VI and some guidance would be much appreciated.
    Thanks in advance
    Tim C.
    1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!

    Tim,
    Rob's idea is probably what you should try first.  It is in effect a low pass filter with about a 10 Hz corner frequency.
    If you find that you have strong power line frequency interference, you may need to do more aggressive signal conditioning.  Especially watch out for ground loops.
    Lynn 

  • Circular Curve Distortion Illustrator 3D/Filter Help?

    Hello I am trying to create a circular graphic that is similar to a race track turn with banking.  Is there a type of distortion filter or 3d that I can use that can help me create the feeling of a vanishing point that bends around a turn?
    Below is sort of the feeling
    Thank you

    You can do it wwith a simple path with a stroke or two and using the 3D Rotate effect with the option to use a perspective on it. You use no fill on th e path just strookes you get this
    This is without the previw on
    This is with the preview turned on

  • Powershell Scripting Help

    So, I am building somepowershell scripts for better management of the windows side of our domain
    I had a major issue that I want to try, and I was wondering if someone could help me out here:
    I want to use powershell to get all users in Active Directoy, and I want the script to list the OU that the users happen to be in.
    For Example:
    Domain.net
    Admin 1, OU: Admins
    Admin 2, OU: Admins
    User 1, OU: Users
    etc, etc
    Is this at all possible? I have tried combinging various scripts and variables I have found through online resources, but the outcome has been rather... well, a failure to be honest.
    Any help would be greatly appreciated.
    Thanks in advance.

    I have a long ramble:http://community.spiceworks.com/topic/1048057-outlook-calendar-disappeared-overnight-office-updates-maybe-coincidence
    where I am trying to work out what happened and then saw this:http://answers.microsoft.com/en-us/office/forum/office_365hp-outlook/outlook-rss-feed-problem-after-last-office-365/073b5c31-3015-4386-a6d8-36e7747d92f0
    which leads me to believe it isn't me going made, trigger finger...., but a borked Office update.

  • Powershell expert help needed in powershell remoting C#

    im trying powershell remoting for some specific operatons on a  remote computer and  using wsman for the connection options.
     WSManConnectionInfo connectionInfo = new WSManConnectionInfo(false, sharepointHost, 5985, "/wsman", "http://schemas.microsoft.com/powershell/Microsoft.PowerShell", new System.Management.Automation.PSCredential(admindata.Domain + "\\" + admindata.Admin, Helper.ToSecureString(admindata.Password)));
     connectionInfo.AuthenticationMechanism = AuthenticationMechanism.Credssp;
     connectionInfo.ProxyAuthentication = AuthenticationMechanism.Negotiate;
    normally it works fine but sometimes just before the runspace.open command is executed, the machine is pinging with its hostname and when the runspace.open is called, the machine doesnt ping with its hostname and my poweshell code fails with exception "machine
    not reachable"
    then after 1 or 2 restarts it pings back and again at runspace.open it doesnt ping. please make a note that um using credssp as authentication mechanism  so whenever i enable or disable WSMancredssp inshort whenever i run either commands in my powershell,
    the remote machine is again pinging with its hostname.
    then after some hours it runs with no disturbance. and i dont have to bother about WSMancreddsp also
    can any one tell me what could be the possible reason for it, is it with my local system or the remote system. Does it has anything to do with me enabling the Credssp thing??? 
    please help me guys, im totally lost here.
    PS: im running these commands on sharepoint server

    Hi,
    I would like suggest you refer to the below link about running powershell within C#:
    How to call Powershell Script function from C# ?
    http://social.msdn.microsoft.com/Forums/is/csharpgeneral/thread/faa70c95-6191-4f64-bb5a-5b67b8453237
    http://stackoverflow.com/questions/527513/execute-powershell-script-from-c-sharp-with-commandline-arguments
    How to run PowerShell scripts from C#
    http://www.codeproject.com/Articles/18229/How-to-run-PowerShell-scripts-from-C
    Hope this helps.
    Regards,
    Yan Li
    Cataleya Li
    TechNet Community Support

  • Ldapsearch or search-filter help required

    Hi,
    I have two directory Contexts (one is the sub-context of the other).
    like : -
    ou=SUN,<base DN>
    cn=empl1,ou=SUN,<base DN>
    ou=IBM,<base DN>
    cn=empl2,ou=IBM, <base DN>
    The objectClasses for the context entries are Companies and Employees .
    Now i want to search for employee by name empl2 who is working in IBM. The returned attributes should contain both the attributes of IBM and the employee empl2.
    I swear , the application being developed requires such complex search and as usual for performance sake, result should be fetched using single search constraint (nothing unusual, i am still incompetent) .
    some-one please help me solve this problem. Pointers to online resource on complex ldap searches will also help.
    thanks in advance
    sridhar

    (&(cn=empl2)(ou=ibm))

  • Automator quartz filter help for pdf downsizing

    i am trying to get this thread going on my computers and I can't quite tell what i am doing wrong.
    i've to the Reduce File Size (75%).qfilter file but i am not having luck getting it working.
    also, i seem to have a convertImages.workflow file but i am reading through about fifty pages of threads and i'm basically at a loss right now.
    i /have/ been able to install filters that will let me downsize pdfs from within Preview but can anyone help me get  one or both of the above going?
    pretty please?

    oops. here's one of the threads:
    https://discussions.apple.com/thread/3058047?start=0&tstart=0

  • Bursting Filter help

    I have XML data as in the example below. When all data (elements A_B_PROD, C_PROD, TOTAL_PROD,TOTAL_COACH_PROD, CREDITED_AMOUNT, XDRDAY and TOTAL_CREDITED ) are zero, as the middle person is, i don't want to send anything out of my Burst job.
    this is my select expression: select="/BF_ADC_TRACK_TEMPLATE/LIST_BF_ADC_TRACK_BASE/BF_ADC_TRACK_BASE"
    I am using this filter expression, but it is not working; an email with PDF is still being generated. Can someone tell me why?
    filter="/BF_ADC_TRACK_TEMPLATE/LIST_BF_ADC_TRACK_BASE/BF_ADC_TRACK_BASE/LIST_BF_ADC_PERIOD_PROD/BF_ADC_PERIOD_PROD[TOTAL_PROD!=0] or /BF_ADC_TRACK_TEMPLATE/LIST_BF_ADC_TRACK_BASE/BF_ADC_TRACK_BASE/LIST_BF_ADC_PERIOD_COACH/BF_ADC_PERIOD_COACH[TOTAL_COACH_PROD!=0] or /BF_ADC_TRACK_TEMPLATE/LIST_BF_ADC_TRACK_BASE/BF_ADC_TRACK_BASE/LIST_BF_ADC_PERIOD_REV/BF_ADC_PERIOD_REV[TOTAL_CREDITED!=0]"
    ***xml data
    <?xml version="1.0" encoding="UTF-8" ?>
    - <BF_ADC_TRACK_TEMPLATE>
    <P_PERSON_ID />
    <P_SALESREP_ID />
    <P_PERIOD_ID>2011014</P_PERIOD_ID>
    - <LIST_BF_ADC_TRACK_BASE>
    - <BF_ADC_TRACK_BASE>
    <EMPLOYEE_NUMBER>29589</EMPLOYEE_NUMBER>
    <FULL_NAME>susy q</FULL_NAME>
    <EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
    <SALESREP_NUMBER>11111</SALESREP_NUMBER>
    <PERSON_ID>11111</PERSON_ID>
    <SALESREP_ID>11111</SALESREP_ID>
    <HOME_HOSPITAL>1111</HOME_HOSPITAL>
    <PERIOD_ID>2011014</PERIOD_ID>
    <PERIOD_NAME>BW13-11</PERIOD_NAME>
    <INTERVAL_NUMBER>201103</INTERVAL_NUMBER>
    <INTERVAL_NUMBER_EXPANDED>2011 - 03</INTERVAL_NUMBER_EXPANDED>
    <INTERVAL_START_DATE>06/19/2011</INTERVAL_START_DATE>
    <INTERVAL_END_DATE>09/10/2011</INTERVAL_END_DATE>
    <INTERVAL_PAY_DATE>10/14/2011</INTERVAL_PAY_DATE>
    <PERIOD_START_DATE>07/03/2011</PERIOD_START_DATE>
    <PERIOD_END_DATE>07/16/2011</PERIOD_END_DATE>
    - <LIST_BF_ADC_PERIOD_PROD>
    - <BF_ADC_PERIOD_PROD>
    <A_B_PROD>11111</A_B_PROD>
    <C_PROD>11111</C_PROD>
    <TOTAL_PROD>11111</TOTAL_PROD>
    </BF_ADC_PERIOD_PROD>
    </LIST_BF_ADC_PERIOD_PROD>
    - <LIST_BF_ADC_PERIOD_COACH>
    - <BF_ADC_PERIOD_COACH>
    <TOTAL_COACH_PROD>0</TOTAL_COACH_PROD>
    </BF_ADC_PERIOD_COACH>
    </LIST_BF_ADC_PERIOD_COACH>
    - <LIST_BF_ADC_PERIOD_REV>
    - <BF_ADC_PERIOD_REV>
    <CREDITED_AMOUNT>1111</CREDITED_AMOUNT>
    <XDRDAY>0</XDRDAY>
    <TOTAL_CREDITED>1111</TOTAL_CREDITED>
    </BF_ADC_PERIOD_REV>
    </LIST_BF_ADC_PERIOD_REV>
    </BF_ADC_TRACK_BASE>
    - <BF_ADC_TRACK_BASE>
    <EMPLOYEE_NUMBER>22222</EMPLOYEE_NUMBER>
    <FULL_NAME>speedy heedy</FULL_NAME>
    <EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
    <SALESREP_NUMBER>22222</SALESREP_NUMBER>
    <PERSON_ID>22222</PERSON_ID>
    <SALESREP_ID>22222</SALESREP_ID>
    <HOME_HOSPITAL>2222</HOME_HOSPITAL>
    <PERIOD_ID>2011014</PERIOD_ID>
    <PERIOD_NAME>BW13-11</PERIOD_NAME>
    <INTERVAL_NUMBER>201103</INTERVAL_NUMBER>
    <INTERVAL_NUMBER_EXPANDED>2011 - 03</INTERVAL_NUMBER_EXPANDED>
    <INTERVAL_START_DATE>06/19/2011</INTERVAL_START_DATE>
    <INTERVAL_END_DATE>09/10/2011</INTERVAL_END_DATE>
    <INTERVAL_PAY_DATE>10/14/2011</INTERVAL_PAY_DATE>
    <PERIOD_START_DATE>07/03/2011</PERIOD_START_DATE>
    <PERIOD_END_DATE>07/16/2011</PERIOD_END_DATE>
    - <LIST_BF_ADC_PERIOD_PROD>
    - <BF_ADC_PERIOD_PROD>
    <A_B_PROD>0</A_B_PROD>
    <C_PROD>0</C_PROD>
    <TOTAL_PROD>0</TOTAL_PROD>
    </BF_ADC_PERIOD_PROD>
    </LIST_BF_ADC_PERIOD_PROD>
    - <LIST_BF_ADC_PERIOD_COACH>
    - <BF_ADC_PERIOD_COACH>
    <TOTAL_COACH_PROD>0</TOTAL_COACH_PROD>
    </BF_ADC_PERIOD_COACH>
    </LIST_BF_ADC_PERIOD_COACH>
    - <LIST_BF_ADC_PERIOD_REV>
    - <BF_ADC_PERIOD_REV>
    <CREDITED_AMOUNT>0</CREDITED_AMOUNT>
    <XDRDAY>0</XDRDAY>
    <TOTAL_CREDITED>0</TOTAL_CREDITED>
    </BF_ADC_PERIOD_REV>
    </LIST_BF_ADC_PERIOD_REV>
    </BF_ADC_TRACK_BASE>
    - <BF_ADC_TRACK_BASE>
    <EMPLOYEE_NUMBER>33333</EMPLOYEE_NUMBER>
    <FULL_NAME>dolorous ed</FULL_NAME>
    <EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
    <SALESREP_NUMBER>33333</SALESREP_NUMBER>
    <PERSON_ID>33333</PERSON_ID>
    <SALESREP_ID>33333</SALESREP_ID>
    <HOME_HOSPITAL>3333</HOME_HOSPITAL>
    <PERIOD_ID>2011014</PERIOD_ID>
    <PERIOD_NAME>BW13-11</PERIOD_NAME>
    <INTERVAL_NUMBER>201103</INTERVAL_NUMBER>
    <INTERVAL_NUMBER_EXPANDED>2011 - 03</INTERVAL_NUMBER_EXPANDED>
    <INTERVAL_START_DATE>06/19/2011</INTERVAL_START_DATE>
    <INTERVAL_END_DATE>09/10/2011</INTERVAL_END_DATE>
    <INTERVAL_PAY_DATE>10/14/2011</INTERVAL_PAY_DATE>
    <PERIOD_START_DATE>07/03/2011</PERIOD_START_DATE>
    <PERIOD_END_DATE>07/16/2011</PERIOD_END_DATE>
    - <LIST_BF_ADC_PERIOD_PROD>
    - <BF_ADC_PERIOD_PROD>
    <A_B_PROD>33333</A_B_PROD>
    <C_PROD>33333</C_PROD>
    <TOTAL_PROD>33333</TOTAL_PROD>
    </BF_ADC_PERIOD_PROD>
    </LIST_BF_ADC_PERIOD_PROD>
    - <LIST_BF_ADC_PERIOD_COACH>
    - <BF_ADC_PERIOD_COACH>
    <TOTAL_COACH_PROD>0</TOTAL_COACH_PROD>
    </BF_ADC_PERIOD_COACH>
    </LIST_BF_ADC_PERIOD_COACH>
    - <LIST_BF_ADC_PERIOD_REV>
    - <BF_ADC_PERIOD_REV>
    <CREDITED_AMOUNT>33333</CREDITED_AMOUNT>
    <XDRDAY>0</XDRDAY>
    <TOTAL_CREDITED>33333</TOTAL_CREDITED>
    </BF_ADC_PERIOD_REV>
    </LIST_BF_ADC_PERIOD_REV>
    </BF_ADC_TRACK_BASE>
    </LIST_BF_ADC_TRACK_BASE>
    </BF_ADC_TRACK_TEMPLATE>
    Edited by: vykingzOR on Aug 8, 2011 5:44 PM

    An example of multiple emails is here:
    http://garethroberts.blogspot.com/2010/08/ebs-bursting-filter-on-xml-elements.html
    Regards,
    Gareth

  • Low pass filter help

    Hi all, 
    I'm trying to read in a channel, filter the noise out (supposedly the noise is about 10Hz), and then provide visual feedback for forces. Without the filter, everything works as it's supposed to, with the connection being between the data output of the DAQmx read and the input of the array. But when I add the filter, I get the error: Analysis:  The following conditions must be met:  0 < f_low <= f_high <= fs/2. I'm not sure why I am getting this error and why it stops my feedback from occurring. I also have a version with a "nonexpress" filter but my feedback isn't working on this version either. both are attached!
    Thank you!
    Attachments:
    expressfilterAIM2.vi ‏103 KB
    nonexpressfilterAIM2.vi ‏55 KB

    We still have an issue going on. To further explain the program, the program displays peak ground reaction force (GRF) on a chart of someone hopping on a force plate. The program finds the peak GRF by using shift registers, essentially it displays force only when the GRF at the i-1 iteration is greater than GRF at both the previous and next iteration (Aim2Hop2014_v4run.vi). This works until we add a filter (Aim2Hop2014_filt_test.vi). We're not sure what the problem could be, but the case structure is always false for Aim2Hop2014_filt_test.vi, when we didn't have this problem for Aim2Hop2014_v4run.vi. The problem seems to be some lack of compatibility between the case structure and the data coming out of the filter. Does anyone have any ideas about how we can fix this?
    Thank you!
    Attachments:
    AIM2Hop2014_filt_test.vi ‏53 KB
    AIM2Hop2014_v4run.vi ‏46 KB

  • FileDialog....filter help!

    I'm still utterly confused as to how a FilenameFilter works for a filedialog...can anyone give me any sample code? I tried the following:
    fileDialog.setFilenameFilter(new java.io.FilenameFilter() {
                public boolean accept(File pathname) {
                    if (pathname.getName().endsWith(".ars")) {
                        return true;
                    else {
                        return false;
            });and got this error:
    <anonymous windowResults$6> is not abstract and does not override abstract method accept(java.io.File,java.lang.String) in java.io.FilenameFilterwindowResults being the class this is all in.

    java.io.FilenameFilter accept method takes two parameters a File object and a String. Use it with a java.awt.FileDialog. A javax.swing.filechooser.FileFilter's accept method takes a single String parameter and is used with a javax.swing.JFileChooser.
    Hope that helps
    DB

  • Report filter and column formula filter help

    Using OBIEE 11.1.1.6.8
    I have a column formula in an OBIEE Analysis that queries data based on a specific File Date:  31-Oct-2013.   the formula looks like this: SUM(CASE WHEN "CLOV - File Date"."File Date" = '31-OCT-2013' AND "Pending Claim - Process Time"."Claim Date" <= TIMESTAMP '2013-01-31 00:00:00' THEN 1 ELSE 0 END)
    The issue is I have other columns that need to query data as of the most recent File Date available.  For that, I usually use this in the report filter section:  SELECT MAX("CLOV - File Date"."File Date") FROM "VETSNET OPERATIONS REPORTS".   this will pull the most recent date available.
    What formula(s) do I need to use so I can have other columns pull the most recent data while the other column always uses the 31-Oct-2013 date?

    If you like to port the same logic in Analysis then that might be easy to do.
    Not sure how to handle other column ie Claim without looking data, but try with a new metric max(File Date) and set the content level may be Year or as per requirement and use that column in the same expression
    let us know updates

  • Powershell - Need help combining multiple commands (?) into one script

    Scenario:
    When a user is terminated from our company, I run these scripts separately:
    1. I use the script below in Windows Powershell ISE to launch an entry box so I can enter in the username@domain and get a list of distribution groups the termed employee currently manage export to a CSV file on my desktop:
    Add-PSSnapin quest.activeroles.admanagement
    $USerID = Read-host "Enter in Username@domain. Example: [email protected]"
    connect-QADService -service blah.dc1.cba.corp -UseGlobalCatalog
    get-qadgroup -ManagedBy $UserID -Verbose | select Name,Type,DN | export-csv -
    NoTypeInformation "$home\desktop\$UserID.csv" -Verbose -Force
    2. I launch Powershell as an Administrator and run the following to activate Exchange Management in Powershell and to give me access to the entire forest of accounts:
    Add-PSSnapin -name "Microsoft.Exchange.Management.PowerShell.E2010"
    Set-AdServerSettings -ViewEntireForest $true
    3. Next, I run this script to remove the former owner's write permissions from the list of distribution lists they managed in the above CSV file:
    import-csv -Path "<PATH>" | Foreach-Object {Remove-ADPermission -Identity $_.Name -
    User '<domain\username>' -AccessRights WriteProperty -Properties “Member” -
    Confirm:$false}
    4. I run this script to show the new owner of the DLs, allow DL management via Webmail and add info in the Notes section on the DLs:
    import-csv -Path "<PATH>" | Foreach-Object {set-Group -Identity $_.Name -ManagedBy
    "<domain\username>" –Notes “<Enter Here>”}
    5. I run this script to allow management via Outlook and to automatically check the box in Active Directory "Manager can update membership list" under the Managed By tab within the Group's Properties:
    import-csv -Path "<PATH>" | Foreach-Object {Add-ADPermission -Identity $_.Name -User
    ‘<domain\username’ -AccessRights WriteProperty -Properties “Member”}
    Is there a way I can combine this into one Powershell script or two, at the most instead of having to copy and paste 6 different times and use two programs (Powershell and Powershell ISE)? 

    Rhys, again, thanks to your script, I was able to add even more to it to run nicely in PowerShell ISE (running as an Administrator):
    The following happens in the script below in this order:
    1. The script allows searching across multiple e-mail domains that we manage in Exchange
    2. It prompts for entry of the old owner's ID, the new owner's ID and notes that I want to add to the DLs.
    3. It exports a copy of lists owned by the old owner to a CSV file on my desktop.
    4. Powershell pauses and allows me to modify the old owner's.CSV file so I can remove any lists that should not be transferred, save the changes to the CSV file and click continue in Powershell ISE. If all lists should be transferred to the new owner, I
    would simply not edit the CSV export and click OK in Powershell ISE.
    5. Powershell ISE updates the DLs from the CSV export using the information I entered in the entry boxes.
    6. Powershell sleeps for about 1 minute after updating the DLs to allow Active Directory to register the changes. Then, Powershell ISE exports a copy of the lists transferred to the new owner to a <newownerID>.csv file on my desktop. This allows me
    to compare the CSV files (which should have the same exact lists on them) and make sure all of the lists were successfully transferred.
    7. If the lists are not the same because Active Directory didn't update in time while the file csv export was running for the new owner, I can run the script again with the exception of using the newownerID for the entry boxes in Step 2 (Notes don't matter
    as we won't execute any additional steps after capturing the updated export). You would simply select Cancel during the pause window that comes after the export completes to prevent the script from continuing a second time and overwriting your previous entries.
    8. You can now compare the updated newowner.csv to the oldowner.csv file on your desktop. 
    Add-PSSnapin -name "Microsoft.Exchange.Management.PowerShell.E2010"
    Add-PSSnapin quest.activeroles.admanagement
    Set-AdServerSettings -ViewEntireForest $true
    connect-QADService -service xyz-fakeserver.corp -UseGlobalCatalog
    Do {
       $FormerOwner = Read-host "Enter in former DL owner as Username@domain."
       $UserID = Read-host "Enter in new DL owner as Username@domain."
       $Notes = Read-host "Enter in Notes for DL"
       Try {
          get-qadgroup -ManagedBy $FormerOwner -Verbose -ErrorAction Stop | select Name | export-csv -NoTypeInformation "$home\desktop\$FormerOwner.csv" -Verbose -Force
    Read-Host 'Edit <FormerOwner>.CSV file on desktop to remove groups that should stay with current owner, save changes and press Enter or click OK to continue script. If all groups need to be transferred to new owner, do not modify CSV file and press Enter
    or click OK to continue.' 
    import-csv -Path "$home\desktop\$FormerOwner.csv"
    $UserList = import-csv "$home\desktop\$FormerOwner.csv"
    $Userlist | Foreach-Object {
             Remove-ADPermission -Identity $_.Name -User $FormerOwner -AccessRights WriteProperty -Properties “Member” -Confirm:$false
             set-Group -Identity $_.Name -ManagedBy $UserID –Notes $Notes
             Add-ADPermission -Identity $_.Name -User $UserID -AccessRights WriteProperty -Properties “Member”
    Start-Sleep -s 60
    get-qadgroup -ManagedBy $UserID -Verbose -ErrorAction Stop | select Name | export-csv -NoTypeInformation "$home\desktop\$UserID.csv" -Verbose -Force
          $Flag = $True
       } Catch {
          Write-Host "Invalid username or user not found, please try again"
    } While (!$Flag)

Maybe you are looking for

  • Remove Labels from Signature

    Hello - In Acrobat X, how does one eliminate the labels (e.g., "cn=", "email=") from the Sign Document Appearance?  I select "Create New Appearance..." and de-select "Labels" and the Preview does not show labels, however, after I exit the Configure S

  • Received or not..

    Is there any way you can tell if an email has been opened? I sent something very important to a friend and have no idea if she read it or not. Thanks for the help.

  • Website folder structure

    I guess I should preface this by saying and all of this is just trying to find "work arounds" because currently EDGE doesn't have any way I can find in the UI for the user to access/modify the folder structure of projects. I guess if you only have a

  • Ansprechpartner in =?iso-8859-1?Q?=D6sterreich?= !?

    Hallo, ich bin auf der Suche nach einem Ansprechpartner für softwarefragen in Österreich (lt.meines Wissens in Salzburg ) ! bitte um baldige Antwort... an : [email protected] mfg alti

  • Modify a color into Pantone with JS

    Hi. I'm working on a application in Javascript. My claim is to manage the colors in my document. So, for example, I have to change some specific colors in "spot" or "process" model. if (value==1){ app.activeDocument.colors.item(7).model=ColorModel.sp