Symantec Management Platform (Notification Server)

 View Only
  • 1.  Logged-on User

    Posted Feb 29, 2016 12:37 PM

    We are finally going to put our Altiris Deployment Server 6.9 to rest.  We are now running SMP 7.6 and almost everything has been converted over.  One of the things my people are asking for that we have not found on the SMP is a way to list current logged-on user like we could search for on the DS server.  I know there is a primary user field but that is nowhere near as reliable.  I was thinking we could have a task run at login to write to a field on the database logging the last user who logged in.  But I really have no skill set to pull this off.  Is there anything already out there?



  • 2.  RE: Logged-on User

    Posted Mar 01, 2016 04:57 AM

    I believe this is already recorded in the CMDB database in the Evt_AeX_Client_LogOn table.

    There is a scheduled task that runs monthly on the SMP that scans this table to see the most active user per machine. I believe this is how the primary user is calculated.

    However, I've seen cases on connect where this table isn't very accurate.

    Hope this helps.

     



  • 3.  RE: Logged-on User

    Posted Mar 01, 2016 06:16 AM

    You could add a report with this SQL:

    SELECT        dbo.vComputer.Name, dbo.Inv_AeX_AC_Identification.[Last Logon User], dbo.vComputer.[User]
    FROM            dbo.vComputer INNER JOIN
                             dbo.Inv_AeX_AC_Identification ON dbo.vComputer.Guid = dbo.Inv_AeX_AC_Identification._ResourceGuid

    Then people could search that report. But it's a bit clunky to ahve to run that reprot every time.



  • 4.  RE: Logged-on User

    Trusted Advisor
    Posted Mar 02, 2016 11:42 PM

    You can create a Custom Data Class and use the following powershell script to execute against your machines.  The script will return the Seesion, User and Active status.  

     

    #************************DO NOT EDIT********************************
    $nse = New-Object -com Altiris.AeXNSEvent
    $nse.To = "{1592B913-72F3-4C36-91D2-D4EDA21D2F96}"
    $nse.Priority = 1
    #************************DO NOT EDIT********************************

    #Modify this varaible with the custom data class guid
    $strDataClassGuid = "{Custom Data Class Guid Goes Here}"

    $objDCInstance = $nse.AddDataClass($strDataClassGuid)
    $objDataClass = $nse.AddDataBlock($objDCInstance)

    #Add new row of data
    $objDataRow = $objDataClass.AddRow()


    function Get-TSSessions {
        param(
            $ComputerName = "localhost"
        )

        qwinsta /server:$ComputerName |
        #Parse output
        ForEach-Object {
            $_.Trim() -replace "\s+",","
        } |
        #Convert to objects
        ConvertFrom-Csv
    }


    $session = Get-TSSessions -ComputerName "localhost" | ? { $_.State -eq 'Active' } | Select-Object SessionName | %{$_.SessionName}
    $user = Get-TSSessions -ComputerName "localhost" | ? { $_.State -eq 'Active' } | Select-Object UserName | %{$_.UserName}
    $state = Get-TSSessions -ComputerName "localhost" | ? { $_.State -eq 'Active' } | Select-Object State | %{$_.State}

     

    $objDataRow.SetField(0, $session)
    $objDataRow.SetField(1, $user)
    $objDataRow.SetField(2, $state)

    #Send the data
    $nse.SendQueued()



  • 5.  RE: Logged-on User

    Posted May 11, 2016 04:57 AM

    Hi Rick,

    I don't know if this is still an issue for you but we have resolved this issue by doing the following:

    1. Create a custom dataclass called 'Assigned User' and link it to Asset Type Computer

    2. Create a custom report using the 'Report Wizard' that includes:

    1. Primary User (Calculated on the number of logoffs for each month)
    2. Last Logon User (No explanation required I hope)
    3. Assigned User

    Assigned user is populated by manually right clicking and choosing edit for each Computer. Or you can do what I did and import the information, if you have an existing source e.g. BAU often have that information recorded somewhere at deployment time like an Excel workbook.

    Run your report and you will get to see all user information for that PC.

    I actually have a monster csv file that is exported every morning at 6am which includes this information, as well as make, model, serial, location, mem, cpu, location, asset status etc, etc. It is incredibly useful to help us find user of all computers that currently 'missing in action' (as we like to say). We set all computers to 'retire' automatically after 45 days which is right in the goldilocks zone (not to long not to short). At the same time no data is purged until we do it manually (as opposed to a schedule Purge Maintenance task)

    I don't know any SQL but any numnuts is able to create a report and seem clever by using the built in Report Wizard.



  • 6.  RE: Logged-on User

    Posted May 11, 2016 04:57 AM

    Hi Rick,

    I don't know if this is still an issue for you but we have resolved this issue by doing the following:

    1. Create a custom dataclass called 'Assigned User' and link it to Asset Type Computer

    2. Create a custom report using the 'Report Wizard' that includes:

    1. Primary User (Calculated on the number of logoffs for each month)
    2. Last Logon User (No explanation required I hope)
    3. Assigned User

    Assigned user is populated by manually right clicking and choosing edit for each Computer. Or you can do what I did and import the information, if you have an existing source e.g. BAU often have that information recorded somewhere at deployment time like an Excel workbook.

    Run your report and you will get to see all user information for that PC.

    I actually have a monster csv file that is exported every morning at 6am which includes this information, as well as make, model, serial, location, mem, cpu, location, asset status etc, etc. It is incredibly useful to help us find user of all computers that currently 'missing in action' (as we like to say). We set all computers to 'retire' automatically after 45 days which is right in the goldilocks zone (not to long not to short). At the same time no data is purged until we do it manually (as opposed to a schedule Purge Maintenance task)

    I don't know any SQL but any numnuts is able to create a report and seem clever by using the built in Report Wizard.