A script that will query for the last successful backup to tape across all protected datasources

I've searched trying to locate an existing script for this and come up empty so far but essentially what I am trying to do is have a script I can run that will query for the latest backup to tape that succeeded for each data source across all of the protection
groups then output that time/date for each to a file.
I'm extremely new to scripting so I am unsure of how to go about getting started with this so any help would be greatly appreciated!

this should work
foreach ($DS in $DSList)
$RP=$DS | Get-RecoveryPoint | where {$_.Location -eq "Media"} | Sort-Object -Property Backuptime -Descending | select -First 1 | select *
$Tape=Get-DPMTape -DPMLibrary $Library | where {$_.ID -eq $Rp.RecoverySourceLocations.MediaMapList.MediaId}
$obj = New-Object -TypeName PSObject
$obj | Add-Member Noteproperty -Name DatasourceName -value $DS.Name
$obj | Add-Member Noteproperty -Name Sourcecomputer -value $DS.Computer
$obj | Add-Member Noteproperty -Name BackupTime -value $RP.BackupTime
#$obj | Add-Member Noteproperty -Name Location -value $Tape.Location.tostring()
#$obj | Add-Member Noteproperty -Name Medialabel -value $Tape.Medialabel
#$obj | Add-Member Noteproperty -Name Barcode -value $Tape.Barcode.Value
$Array+=$obj
Seidl Michael | http://www.techguy.at | twitter.com/techguyat |
facebook.com/techguyat |
youtube.com/techguyat

Similar Messages

  • Are AASPs allowed to charge customers that will qualify for the 1st Gen iPod nano recall?

    Are AASPs allowed to charge customers that will qualify for the 1st Gen iPod nano recall? There are no Apple stores in the Philippines, only AASPs. Early reports from customers claim that one of the AASPs is charging a 10% discounted price for the replacement. We need clarification from Apple if the AASPs are allowed to do this since this seems counter to what the replacement program is supposed to do. I will not name the AASP for now until I personally confirm the reports.

    There are no Apple stores in my country either, i went yesterday to one of those AASP but they didnt charge me or said anything about a price, just checked the screen, wheel and frame i guess to see if there was anything broken because they didnt turn it on. Confirmed the serial number, gave me a receipt and told me to come back in six weeks with the receipt to get my ipod back. I dont think they are supposed to charge you

  • I have a Mac OS 10.6.7 that will not activate the scanner option on a C7280 HP All in One Printer, Fax, Scanner - the Printer works fine but the scanner does not - any suggestions?

    I have a Mac OS 10.6.7 that will not activate the scanner portion of an HP C7280 All in One - prints fine  - but won't activate scanner.

    I have the same problem with an HP Scanjet 8250 and my Epson Stylus NX400.  I have reloaded allegedly updated drivers.  I have researched using SANE.  Neither scanner wants to work since the  OS X10.6 update.  I have found very little out there about this problem.  
    Can anyone help me make these bricks work?  Really would like a solution that won't cost me hundreds to replace the equipment. Thanks so much.

  • Is there such a modle of iPhone 4S, that will work for the following?

    I have read a couple discussions here, yet 99% of them are talking about using Verizon / Sprint's iPhone 4S on AT&T, or another way.  I'm not finding an answer of my simple question, that is, I want to get an iPhone 4S, which works for CDMA (if not both, at least Verizon), AT&T, T-Mobile, and GSM outside the US.
    What would be the right way to get one?  I ran into problem because I know:
    - An iP4S obtinaed from CDMA (Verizon / Sprint) could be SIM unlocked but only works for GSM carrier outside the US. WIll not work for AT&T or T-Mobile.
    - An iP4S purchased contract-free will work for AT&T, T-Mobile, and GSM outside the US, but not CDMA.
    - An iP4S obtinaed from AT&T, works in AT&T only, the SIM and CDMA cannot be unlocked.

    Thanks for you all above to clarify my question.  One last question here. 
    Taking GSM out of the discussion, can a Verizon iPhone 4S be used in Sprint?  Or if I switch from Verizon to Sprint, I simply have to sell my Verizon iPhone 4S and buy another 4S under Sprint, even they are mechanically identical and the only difference is how software profile is applied?

  • What is the price that will be for the iphone 3g in egypt?

    need answer

    No one here knows.
    I don't believe the provider or providers for the iPhone 3G in Egypt has been announced yet.
    When the provider or provider is announced along with when the iPhone 3G will be available in Eygpt, the provider or providers will announce the price for the iPhone 3G there.

  • TS3992 I keep getting an error message "the last backup could not be completed" every time I try to backup my iPhone manually.  It's been almost two months since the last successful backup!

    My iPhone 4s will not backup. I've tried repeatedly but keep getting the message "the last backup could not be completed".  It's been nearly two months since the
    last backup.  However, my iPad2 is backing up perfectly.  Any thoughts???????

    Try the following steps:
    Plug your iPod Touch to your Mac/PC using USB cable.
    Open iTunes software and choose “backup to this computer” .
    Then you need to do a sysncing.
    Go to iCloud (iPod Touch: Settings > iCloud) and delete all previous backups.
    Then in iTunes, Turn on “backup to iCloud” again.
    On your iOS device, now you are able to backup to iCloud.

  • Script that will automaticly set the focus to the next text box after the previous one is completed

    Specificly, entering a SSN into a form with three text boxes. 1st box for first 3 digits, 2nd box for middle 2 digits, and 3rd box for last 4 digits. I would like the user to be able to enter the 1st three digits into the 1st box, and after the 3rd digit is entered, the focus jumps to the 2nd box, then once the middle two are entered, the focus jumps the the 3rd box without having to manually use the tab key to advance through the boxes. Thanks.

    See JavaScript - setFocus Method for tabbing to next form field for a sample form that uses a document level script and custom keystroke script. See Entering Document Scripts and Entering scripts for form fields by Thom Parker for detailed instructions on entering or viewing these type of scripts.

  • Universe prompt that will not keep the last values selected

    Hi,
    Is there anyone who could help me with my problem. The code in my universe prompt is indicated below.
    {@Select(SubClass\ClassScls ID By Class Prompt) IN @Prompt('Enter the ClassScls ID: ','N','SubClass\ClassScls ID By Class Prompt',multi,Persistent,free,,,,User:1360)}
    Thanks you in advances.
    Rose

    Hi Rose,
    I think you have the syntax mixed up a little.
    Try
    @Select(SubClass\ClassScls ID By Class Prompt) IN @Prompt('Enter the ClassScls ID: ','N','SubClass\ClassScls ID By Class Prompt',multi,free, Persistent,,User:1360)
    Regards
    Alan

  • How to make a program that will ask for a name the first time the program is used and if is not the first time will not ask the name?

    I want to make a program that will ask for the ID of the testing machine the first time the program is running, then will never ask for it. I'm using Labview 6.0

    Hi
    There are a Couple of methods you can use for this.
    Method 1 -
    You can create an ini file and save a boolean Key "First Instance" as True. Now In your Program you read this Key, If it is True then you can show your ID Dialog VI.If False do not run the VI. At the Conclusion of Id Dialog you can update this registry enrty to False. So In effect you have created One time Event. In fact you can save ID as another Config entry.
    The Drawback and advantage is that such an INI file can be edited by someone moderately knowledgeable about the Program
    Method 2
    Use Unitialized Shift Register in A while Loop. Please see LV2 style Globals entry under this forum. You can read and write to this Variable and it retains the Value it last had within it.
    You can read
    this Global the Very first time and say if it true you display your ID Vi. If False you dont. When you display your ID Vi you can Update your Global Like Before.
    If you need Example Let me Know.
    Good Luck
    Mache!!
    Good Luck!
    Mache

  • I get no wireless signal in my home, so need a network extender for the Lumia 2520.  Specs indicate LTE FDD network:Band 20 (800MHz), Band 3 (1800 MHz), Band 7 (2600 MHz). Does Verizon offer a network extender that will work with the Lumia?

    I get no wireless signal inside my home, only outside, so I need a network extender that will work for the Lumia 2520, Specs indicate it uses LTE FDD netork Band 20 (800MHz), Band 3 (1800MHz), Band 7 (2600 MHz).  Does Verizon offer a network extender that will work with the Lumia 2520?

    We want to make sure you get service in your home Astromandata! I can check your area to see if you qualify for the network extender. What's your zip code? If it does qualify than you will be able to use it for your Lumia to support your voice services. Find out more information here: http://spr.ly/6585fNlt Is anyone else having this issue?
    AmberF_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the �Correct Answer� button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • HT5493 how about giving us a URL that will result in the the "missing plug-in" region appearing so that we can proactively download new java version?

    just accepted OSX update for Oracle SE Java - want to make sure the new plug-in is installed before giving access to wife - need a URL that will ask for the plug-in to be downloaded as the OSX update only removed the apple version.

    How do I test whether Java is working on my computer?

  • Search for the last delimiter in a string

    Hi all,
    My requirement is whenever my length of the string reach 50 characters, the program will search for the last comma delimiter and break line into 2 lines.
    The string format is like this: -
    Input: -
    1234567890123456789012345678901234567890,1234567890
    Expected output: -
    1234567890123456789012345678901234567890,
    1234567890
    Input: -
    1234567890,1234567890,1234567890,1234567890,1234567890
    Expected output: -
    1234567890,1234567890,1234567890,1234567890,
    1234567890
    The difficult part for me is how to search for the last comma delimiter when it reached 50 characters?
      IF strlen(gv_fetxt) > 50.
      .... " do something to break the line into two lines. 
      ENDIF.
    Please help and guide me.
    Thanks in advance.

    Hi,
    Test the following Sample Code it is working according to your Requirements.
    DATA: str1(200),
          str2(200),
          str3(200),
          main_str_len TYPE i,
          sub_str_len TYPE i,
          off_start TYPE i,
          off_end TYPE i.
    DATA: BEGIN OF it_str OCCURS 100,
      str(200),
      END OF it_str.
    str1 = '1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890,1234567890'.
    main_str_len = STRLEN( str1 ).
    off_start = 0.
    off_end = 50.
    WHILE main_str_len GE 0.
      IF main_str_len GT 50.
        CALL FUNCTION 'STRING_REVERSE'
          EXPORTING
            string    = str1+off_start(off_end)
            lang      = 'E'
          IMPORTING
            rstring   = str1+off_start(off_end)
          EXCEPTIONS
            too_small = 1
            OTHERS    = 2.
        REPLACE FIRST OCCURRENCE OF ',' IN str1 WITH '$'.
        CALL FUNCTION 'STRING_REVERSE'
          EXPORTING
            string  = str1+off_start(off_end)
            lang    = 'E'
          IMPORTING
            rstring = str1+off_start(off_end).
        SPLIT: str1 AT '$' INTO str2 str3.
        it_str-str = str2.
        APPEND it_str.
        str1 = str3.
        sub_str_len = STRLEN( str2 ).
      ENDIF.
      IF main_str_len LT 50.
        it_str-str = str1.
        APPEND it_str.
        main_str_len = -1.
      ELSE.
        SUBTRACT: sub_str_len FROM main_str_len.
      ENDIF.
    ENDWHILE.
    LOOP AT it_str.
      WRITE: it_str-str.
    ENDLOOP.
    Please Reply if any Issue,
    Best Regards,
    Faisal

  • I need a script that will find the computer a user last logged into.

    I am still learning scripting, I need a script that will allow me to pull in usernames from a csv file. Find what computer they last logged into and output that to an csv file.
    I have looked all over and can't find exactly what I need.
     I found the following script but I need  to add the resuitsize unlimited but can not figure out where to put it we have a large environment. Also I need to be able to grab username from a csv file. Any assistance you can provide is appreciated.
    ##  Find out what computers a user is logged into on your domain by running the script
    ##  and entering in the requested logon id for the user.
    ##  This script requires the free Quest ActiveRoles Management Shell for Active Directory
    ##  snapin  http://www.quest.com/powershell/activeroles-server.aspx
    Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
    $ErrorActionPreference = "SilentlyContinue"
    # Retrieve Username to search for, error checks to make sure the username
    # is not blank and that it exists in Active Directory
    Function Get-Username {
    $Global:Username = Read-Host "Enter username you want to search for"
    if ($Username -eq $null){
    Write-Host "Username cannot be blank, please re-enter username!!!!!"
    Get-Username}
    $UserCheck = Get-QADUser -SamAccountName $Username
    if ($UserCheck -eq $null){
    Write-Host "Invalid username, please verify this is the logon id for the account"
    Get-Username}
    get-username resultsize unlimited
    $computers = Get-QADComputer | where {$_.accountisdisabled -eq $false}
    foreach ($comp in $computers)
    $Computer = $comp.Name
    $ping = new-object System.Net.NetworkInformation.Ping
      $Reply = $null
      $Reply = $ping.send($Computer)
      if($Reply.status -like 'Success'){
    #Get explorer.exe processes
    $proc = gwmi win32_process -computer $Computer -Filter "Name = 'explorer.exe'"
    #Search collection of processes for username
    ForEach ($p in $proc) {
    $temp = ($p.GetOwner()).User
    if ($temp -eq $Username){
    write-host "$Username is logged on $Computer"

    If you are querying by user "resultset size" will be of no use.
    You also have functions that are never used and the body code doe snot look for users.
    Here is what you scrip looks like if printed well.  It is just a jumble of pasted together and unrelated items.
    ## Find out what computers a user is logged into on your domain by running the script
    ## and entering in the requested logon id for the user.
    ## This script requires the free Quest ActiveRoles Management Shell for Active Directory
    ## snapin http://www.quest.com/powershell/activeroles-server.aspx
    Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
    $ErrorActionPreference = "SilentlyContinue"
    # Retrieve Username to search for, error checks to make sure the username
    # is not blank and that it exists in Active Directory
    Function Get-Username {
    $Global:Username = Read-Host "Enter username you want to search for"
    if ($Username -eq $null) {
    Write-Host "Username cannot be blank, please re-enter username!!!!!"
    Get-Username
    $UserCheck = Get-QADUser -SamAccountName $Username
    if ($UserCheck -eq $null) {
    Write-Host "Invalid username, please verify this is the logon id for the account"
    Get-Username
    get-username resultsize unlimited
    $computers = Get-QADComputer | where { $_.accountisdisabled -eq $false }
    foreach ($comp in $computers) {
    $Computer = $comp.Name
    $ping = new-object System.Net.NetworkInformation.Ping
    $Reply = $null
    $Reply = $ping.send($Computer)
    if ($Reply.status -like 'Success') {
    #Get explorer.exe processes
    $proc = gwmi win32_process -computer $Computer -Filter "Name = 'explorer.exe'"
    #Search collection of processes for username
    ForEach ($p in $proc) {
    $temp = ($p.GetOwner()).User
    if ($temp -eq $Username) {
    write-host "$Username is logged on $Computer"
    I suggest finding the original code then use the learning link at the top of this page to help you understand how it works in Powershell.
    ¯\_(ツ)_/¯

  • My iCloud has been 'upgrading' for the last 12 hrs. That is, after I had pressed 'install after downloading the latest, improved version without entering my password. How do I get back to the window that will allow me to enter my password?

    My iPad has been 'upgrading' for the last 12hrs.That is, after I had downloaded the new version of iCloud, and pressed 'Install' without entering my password. It is probably searching for it. How do I go back to the window that will allow me to enter my password. I have tried switching off the device, but each time the 'upgrading' comes on. I have also switched it off and left it on the charger for at least 6 hrs.

    My iPad has been 'upgrading' for the last 12hrs.That is, after I had downloaded the new version of iCloud, and pressed 'Install' without entering my password. It is probably searching for it. How do I go back to the window that will allow me to enter my password. I have tried switching off the device, but each time the 'upgrading' comes on. I have also switched it off and left it on the charger for at least 6 hrs.

  • My macbook has Itunes and I am trying to download some songs that I bought on my Ipad onto the macbook. It has worked in the past, but one song has been downloading for the last day. No more will download it seems stuck downloading.

    My macbook has Itunes and I am trying to download some songs that I bought on my Ipad onto the macbook. It has worked in the past, but one song has been downloading for the last day. No more will download it seems stuck downloading. I don't need the song. But I want the others to download.

    Hi there,
    You may find the information in the articles below helpful.
    Downloading past purchases from the iTunes Store, App Store, and iBooks Store
    http://support.apple.com/kb/ht2519
    iTunes: How to resume interrupted iTunes Store downloads
    http://support.apple.com/kb/ht1725
    -Griff W. 

Maybe you are looking for

  • Custom fields values not saved in AUFK using bapi_alm_order_maintain

    Hi ,     We have a requirement where we have to update the custom fields in enhancement tab of IW31 using bapi_alm_order_maintain. We are able to get the successful creation of work order ,but the custom fields are not updated in enhancement tab aswe

  • Apple VGA adapter not compatible with OS 5 on iPad!

    Few months ago I updated my iPad 2 to OS 5. Since then, the Apple VGA Adapter has stopped working and I'm no longer able to mirror the content of my device on my TV (or any other TVs or equipments for that matter). Before the update, with OS 4, it wa

  • Transcode not needed, but the exported files are very large

    Hi. I imported a video file (*.m2v) and its associated audio file (*.wav) to Encore. These two files were transcoded and exported by Premiere Pro (setting of the Encoder was MPREG-2 DVD). Now, in Encore, I chose NOT to transcode, because the files ar

  • ICal not updating edited entries

    Hello: Not sure if this is an iCal issue or a MobileMe/sync issue, but the issue is affecting iCal directly. If from my iMac, I make a new entry in iCal all my devices (i.e. MobileMe, iPhone, and iPad) are updated properly. But if I edit an entry, su

  • Mysql linked server queries

    hello everyone, after spending most of the day trying to figure this out i hope that you guys with more experience can provide some suggestions. i have been experimenting with the a linked server (MYSQL 5) and managed to get all the select queries to