Extract the last opening date of session using Groovy?

Is it possible to extract the last opening date of session of the user via a Groovy script?  I went through the scheme, but I don't have the slightest idea how to begin to know where there.

Ideally, I'd end up with a list that displays the name of each user connection and date of last connection.

Try this:

msg = new StringWriter()

SS = server. SecurityService;

FMS = server. HaMembershipService.getHostName)

Msg. Append ("FMS; Foglight ID; Foglight roles; lastLogonTS; logonCount; statusDesc; logonType; createdTS\n')

(user) {ss.findAllUsers ()}

Msg. Append (FMS). Append(";")

Msg. Append (User.Name). Append(";")

List =]

for (secRole in ss.getAllRolesForUser (user.name)) {list += secRole.name}

Msg. Append("["). Append (List.Join(",")). Append("];")

Msg. Append (User.lastLogonTS.ToString ()). Append(";")

Msg. Append (User.logonCount.ToString ()). Append(";")

Msg. Append (User.getStatusDesc ()). Append(";")

If (User.isExternal ()) {msg.append ("external ;")}

Else {Msg.Append ("Internal ;")} ")}

Msg. Append (User.createdTS.ToString ()). Append ("\n")


return msg;

Tags: Dell Tech

Similar Questions

  • How to find the last update date, time and user of the file field peoplecode

    How to find the last updated date time fields of peoplecode records?

    Thank you.

    We can check the update date-time using the following query


  • When I click on the '+' to the right of the last open tab on the tab bar, a new tab will not open. Help, thanks, Jim

    When I click on the '+' to the right of the last open tab on the tab bar, a new tab will not open. Help, thanks, Jim

    The Ask toolbar is originally only in versions of Firefox 3.6.13 +. Uninstall this extension.

    There are a few places to check for the Ask toolbar:

  • When I open Photoshop, the program opens an image I used for weeks, what can I do to remove this image?

    When I open Photoshop, the program opens an image I used for weeks, what can I do to remove this image?

    He goes into the AutoRecover file.

    Location on windows: C:\Users\UserName\AppData\Roaming\Adobe\Adobe Photoshop CC 2015\AutoRecover

    Location on MAC: ~/Library/Application Support/Adobe/Adobe Photoshop CS6/recovery automatic

    Delete all the files inside or you want.



  • 10 PSE opens with the last open image. How to stop?

    This is probably a simple configuration change.  I just downloaded and installed the PES 10 today.  Whenever it is started, he pulls and displays the last picture open initially to the top. I want it to start with a blank screen instead of the last open image.  Can someone tell me please how to do this?

    Thanks for any help.


    The settings for that this change must be made in the system preferences. It is not specific to PSE10. In system-> general preferences, uncheck the option "restore windows when you exit and reopen app."

  • Stop the quicktime open .dat file

    I need to download a data file with the extension .dat from a web page link, but when I click it it opens Quicktime. I looked in preferences-Applications to try to change the management of the .dat files, but I see no entry for them. How can I do it gives me the option to save the file rather than open Quicktime?

    You can click the link to the .dat file and use ' save the link under ' to save the .dat on the hard drive.

  • XY-do graphics as the record of the last 100 data points


    I'm trying to plot data over a period of about 110 s (99Hz sampling frequency). The problem is that the XY-graph I use seems to collect only the last 100 samples for some reason any. I do something wrong or is it just a property that is interchangeable?

    Hi Aleksi,

    You may not set up "BuildXYGraph" more accurately? Like turning off the only option of this ExpressVI?

  • How to extract the response JSON data

    Hi all

    I get the following response from the server.

    "PAO - ENV ="http://schemas.xmlsoap.org/soap/envelope/"xmlns:ns1 =" urn: soapservice "container ="http://www.w3.org/2001/XMLSchema"xmlns: xsi ="http://www.w3.org/2001/XMLS
    "Chema-instance" xmlnsPAO - ENC = "http://schemas.xmlsoap.org/soap/encoding/" SOAP - ENV:encodingStyle ="http://schemas.xmlsoap.org/soap/encoding/" > ""<>
    tAdvertismentReturn xsi: type = "xsd: String" > {'MSG1': '1', "MSG2": "success", "DA..."}

    Now, I want to create a QVariantList using JsonDataAccess.

    If I manually extract the JSON string after that

    downloadData = jda.loadFromBuffer (data);

    so I'm able to get the data.

    Without extraction like that how can I take the response JSON data?

    Thank you.

    Thanks for your time,

    Here's my problem how to build a soap with the response object.

    I solved this problem with the help of the example of the weather.

    Thank you.

  • I've updated to the last muse cc, when I use web fonts edge in design, they work perfectly, but when I discovered them in preview mode, they are replaced by the police without serif.

    need help

    Are you extract it Muse or HTML file exported, When you're off line?

    If this is not the case, then please provide a URL for your site (stable) online, or a screenshot of your page in browser or Muse .

    If so, then let me explain a difference of business and legal.

    The Typekit font collection is a constantly growing catalog of Adobe and Typekit that you pay your subscription to Adobe CC . Fonts Web Edge are just an extra 'free service' by Typekit, using most of the fonts online Google is kindly serving and the maintenance of the domain open source, free. So, for the edge of the Web, fonts Typekit is just a 'bridge' to these policies of Google open source.

    Now technically, when you remember a page in Muse with paid Typekit fonts, Adobe CC automatically download and save a version (a little protected) of the local police. So when you're offline, Typekit fonts is always present and available for previewing. Your page refers to a resource stored police locally. But when you use a free Fonts Web Edge, Muse is legally not allowed to automatically download and store such a policy of source open for you. Your page refers to a font resource online !

    That a solution might be to go to Google Fontsand download the entire police family, you need and start using them in Muse as fonts 'self hosted' (perfectly legally, you have the right to do). So the fonts will be also included as resources copied to your web folder, locally and online.

  • inventory including the last report date of extinction


    I'm new to power cli (about a week to try) and am trying to run a powercli script that will give me a list of off the virtual computer with specific information, including the date, it has been turned off. My script looks like this:

    Title: vminventory.ps1
    Description: Export VM Information for vCenter in one. CSV file for import into what anyone
    Date: 15/10/2012
    # Get virtual center to connect to:
    $VCServerName = Read-Host "What is the name of Virtual Center?"
    $ExportFilePath = Read-Host "where you want to export the data?
    $VC = to connect-VIServer $VCServerName
    $Report = @)
    #$VMs = get-file $VMFolder | Get - VM
    $VMs = get - vm | WHERE-object {$_.powerstate - eq "poweredoff"}
    $Datastores = get-Datastore. Select Name, Id
    $VMHosts = get-VMHost | Select Name, Parent
    # Get turned off from the time of the event:
    {ForEach ($VM to $VMs)
    Get-VIEvent-body $VM - MaxSamples ([int]: MaxValue) | where {$_-is [VMware.Vim.VmPoweredOffEvent]} |
    Group-object - property {$_.} Vm.Name} | %{
    $lastPO = $_. Group | Tri-objet-property Createduserid-descending | Select - 1 first | Select Createduserid - ExpandProperty
    New-object PSObject-property @ {}
    VM = $_. Group [0]. Vm.Name
    "The last Poweroff" = $lastPO
    $VMView = $VM | Get-View
    $VMInfo = {} | Select VMName Powerstate, OS, IPAddress, ToolsStatus, host, Cluster, data store, NumCPU, MemMb, DiskGb, SSGOwner, BUSowner, PowerOFF, Note
    $VMInfo.VMName = $vm.name
    $VMInfo.Powerstate = $vm. PowerState
    $VMInfo.OS = $vm. Guest.OSFullName
    $VMInfo.IPAddress = $vm. Guest.IPAddress [0]
    $VMInfo.ToolsStatus = $VMView.Guest.ToolsStatus
    $VMInfo.Host = $vm.host.name
    $VMInfo.Cluster = $vm.host.Parent.Name
    $VMInfo.Datastore = ($Datastores | where {$_.}) ID-match (($vmview.)) Data store | Select - first 1) | Select the value). Value} | Select name). Name
    $VMInfo.NumCPU = $vm. NumCPU
    $VMInfo.MemMb = [math]: round (($vm.)) (MemoryMB), 2)
    $VMInfo.DiskGb = [math]: Round ((($vm.)) Hard drives | Measure-Object-CapacityKB property-sum). Summary * 1 k / 1 GB), 2)
    $VMInfo.PowerOFF = $lastPO
    $VMInfo.SSGOwner = ($vm |) Get-Annotation - CustomAttribute "SSG system owner"). Value
    $VMInfo.BUSowner = ($vm |) Get-Annotation - CustomAttribute "Business system owner"). Value
    $VMInfo.Note = $vm. Notes
    $Report += $VMInfo
    $Report = $Report | Sort-Object VMName
    IF ($Report - don't ' ') {}
    $report | Export-Csv $ExportFilePath - NoTypeInformation
    $VC = disconnect VIServer $VCServerName - confirm: $False

    I can't get to browse and read the power of the events in the log of the events on the virtual machine?  Someone at - it ideas?

    No, my mistake. Which should have been $lastPO.VM.VM.

    I've corrected the above code

    Update: just noticed another typo, it's fixed

  • Extract the ASO cube data slices


    For Essbase version, is there a way (using scripts) to extract data slices in a text file?  We understood how the data in the ASO cube zero slices, but have none managed to extract the data.  Please keep in mind, we have no reporting tools for this, we use Excel to our reporting needs

    Thanks as always!

    There are pretty much two different (well, there are also a third way) ways to get out Essbase data:

    (1) write a report script

    (2) write an MDX query

    (3) buy Star Integration Server (now owned by IBM) and point to the comic in question.

    Not surprisingly, there is no quick fix with these choices.  I wrote a blog about report vs MDX scripts, and the answer is (i.e. that one is the best)... depends on:


    I hope to put some of the trials above against a box of Star Integration Server (no, I don't work for them) to see if he can better the time extracted in the near future.

    Kind regards

    Cameron Lackpour

  • SQL to generate the last weeks date (not a stored procedure)

    I need SQL to generate the last dates of weeks from Monday to Sunday. I don't want to use the data in the table or the stored procedure. I need inline SQL. Please help me with your suggestions. Thanks in advance for the help.

    Varun says:
    I need SQL to generate the last dates of weeks from Monday to Sunday. I don't want to use the data in the table or the stored procedure. I need inline SQL. Please help me with your suggestions. Thanks in advance for the help.

    below should help you get started

    SQL> /
    7 rows selected.
  • To find the last year data / data of the year an individual


    How to find the data for the whole of last year, I tried like

    entered_date between to_char (December 31, 2008 11:59:59 ', ' HH12:MI:SS MM/DD/YYYY ')
    and to_char (1 January 2010 00:00:00 ',' DD/MM/YYYY HH12:MI:SS'), but it's an error invalid number.

    Thank you.


    If you want something that doesn't require you to hardcode a year, but the numbers automatically in what year it is:

    WHERE   entered_date     >= ADD_MONTHS ( TRUNC (SYSDATE, 'YEAR')
                                              , -24
    AND     entered_date     <  ADD_MONTHS ( TRUNC (SYSDATE, 'YEAR')
                                              , -12

    There are a couple of things to notice on the expression that you posted (in addition to using TO_CHAR TO_DATE instead):

    WHERE  entered_date     BETWEEN TO_DATE ('12/31/2008 11:59:59', 'MM/DD/YYYY HH12:MI:SS')
                          AND       TO_DATE ('01/01/2010 00:00:00', 'MM/DD/YYYY HH12:MI:SS')

    BETWEEN includes two end points, so the phrase above covers just a little over a year. It includes a second of 2008 and a second in 2010, as well as the whole of 2009.

    Currently, 2010 is the last year, so the expression you have posted (as well as my suggestion) is actually for the year before last year, but it can easily be changed for the whole year.

  • If the record not found this particular date, then select the last recordings date.

    I have three columns
    Number DP_FND_CODE;
    Date of DP_DATE;
    Number DPPRICE;

    I want that if dp_uprice not found this particular date (: dd1) then
    Select maximum Dp_uprice that the date would be less then: dd1

    Example: -.
    I run query and :DD1 parameter = 18/10/2010
    SELECT dp_fnd_code, dp_date , dp_uprice dpprice 
    FROM dailyprice where dp_date = :dd1
    DP_FND_CODE DP_DATE                      DPPRICE
    ----------- ----------------------- ------------
              1 18/10/2010                  109.0344
              2 18/10/2010                   10.1045
              3 18/10/2010                  100.4010
              4 18/10/2010                  102.3276
              6 18/10/2010                   14.6958
              7 18/10/2010                   98.8300
              8 18/10/2010                  102.0900
    It will show that all the Archives: dd1 = 18/10/2010, you can see above the result of the query DP_FND 5 is missing.
    I want to if there is no DPRICE of that particular date (: DD1) then it shows the date of the last DPPRICE.
    Like this
    DP_FND_CODE DP_DATE                      DPPRICE
    ----------- ----------------------- ------------
              1 18/10/2010                  109.0344
              2 18/10/2010                   10.1045
              3 18/10/2010                  100.4010
              4 18/10/2010                  102.3276
              5 16/10/2010                  122.3276          
              6 18/10/2010                   14.6958
              7 18/10/2010                   98.8300
              8 18/10/2010                  102.0900
    so I used this query, but correct nicely.
    SELECT dp_fnd_code, dp_date, 
                 case when dp_uprice is null then(
               select max(dp_uprice) dpprice from dailyprice where dp_date < :dd1 group by dp_fnd_code,dp_date
               ) else dp_uprice  end dpprice 
      FROM dailyprice 
      where dp_date = :dd1
      order by dp_fnd_code
    Thanks in advance.
    SELECT dp_fnd_code,
           max(dp_date) keep (dense_rank last order by dp_date),
           max(dpprice) keep (dense_rank last order by dp_date)
      FROM dailyprice
      where dp_date <= :dd1
      group by dp_fnd_code
      order by dp_fnd_code;
  • Import notes that in SOD - how to set the last-modified Date?

    We are still doing our Siebel users. We launched on-air, and therefore some users who were still using legacy systems while some worked far in Siebel. What I'm trying to do now is to take over from representatives in the old system and go to Siebel. I have the file created with the subject, external account id, note (description) and the date that the note was created in the old system. When I try to import the date cannot be set and is broken at the time of that creation of the acutal in Siebel note.

    It is a problem that I have 3 years of account history that should be loaded and if I import all of this now, it will push the notes in the system to bottom of the list who will be upset representatives began uisng Siebel in the first wave.

    My goal is simply to be ordered from oldest to newest on top, but I can't seem to find a way to do that using the tool of importation as a last modification Date is not an option for me to import.

    Is it possible to do? If not, anyone know of a work around to achieve the same goal?

    Any help is very appreciated.


    It wouldn't appear in the Notes section of the retail account. Currently, it is not possible to import the date as part of an import of Notes.

Maybe you are looking for

  • First - Division of polynomial

    Quick questions, hoping someone can explain. I want to do first HP (2 x ^ 2 + x + 6) /(x+1) When I enter quot(2x^2+x+6,x+1) I get 2 x-1, but he neglects to tell me about the rest of (7 / x + 1) is this nbehaviour expected? How can I get a complete re

  • "Import...". "immediately said no programs that contain"bookmarks, data history or password ".

    Try to import passwords that have been exported from a previous installation of FF. When I go to "File"-> "import...". "Immediately, I get a message"no program that contain bookmarks, data history or password ". System: Mozilla/5.0 (X 11; U; Linux x8

  • How can I get rid of the error oxc0000135 status? It does not my pc start.

    Under XP Home edition, I get the error message status oxc0000135.  Even when I try to reboot from the windows CD.

  • jujfpolmfc.tmp

    One knows why this appears on my desktop at the top of the page everytime I open Internet Explorer?

  • error 8009

    Software is installed on a computer Dell running vista.  Tried to hot sync and got the following message appears: "(ERROR: HSWizardNotify.dll doesn't have a request of confirmation and cancelled the sync operation)."HotSync error: A canceled request