Jump to content

MikeW

Hornbill Users
  • Posts

    12
  • Joined

  • Last visited

Posts posted by MikeW

  1. I am trying to change/update the names of a bunch of assets in one go. I figured doing it via the CSV Import Utility would be a straight forward way as I don't want to change any other fields other than the name. 

    I want to identify the asset via the asset tag and change the name so added the "h_asset_tag" and "assetTag" to the "AssetIdentifier" and "CSVAssetIdentifier" fields on the JSON - see attached pic. I assumed this would pick up the Asset Tag as the identifier and update the name to whatever I wanted. All this does is create a new asset with the new specified name from the CSV.

    When I change the JSON data to "h_name" (AssetIdentifier) and "name" (CSVAssetIdentifier), it picks up the correct asset and updates it but of course I can't change the asset name that way. But could change the asset tag and add other info if needed.

    Any ideas of a way to bulk change/update asset names? We use SCCM to sync our assets in to Hornbill. This name update would be something that will only be done a few times and will only effect assets that are no longer in SCCM so they would remain with the name change and not sync again with SCCM if that makes sense.

     

    Thanks

     

    CSV asset update.PNG

  2. Has anyone seen this or know how to solve - 

    I have setup and successfully imported/synced assets from SCCM directly in to Hornbill but now realise I am missing some data - data that has neither a primary user or a last logged on user. It would appear that my SQL code/query will not import/sync an asset if it has neither a primary user or last logged on user. We do have a number of devices with this and would like them imported/syncing.

    I have tested my code on SQL Server Management Studio. The code is correct but it misses assets that don't have a primary or last logged on user so would appear to be a SQL issue rather than Hornbill. I remove the primary user and last logged on user code then the 'missing' assets appear and can then be imported/synced.

    Does anyone have any ideas how to import/query asset data that doesn't have a primary or last logged on user? I could do an import without the user code then another with it but don't really want to be doing this. I presume there must be a way to still query the data if these fields are blank. Sadly by SQL knowledge is limited. 

    My query code is - 

    select dbo.System_DISC.Netbios_Name0 AS [MachineName], dbo.System_DISC.User_Name0 AS [LastUserName], dbo.User_DISC.employeeID AS [LastLogged], dbo.Operating_System_DATA.Caption00 AS [OperatingSystem], dbo.Operating_System_DATA.Version00 AS [OperatingSystemVersion], dbo.Computer_System_DATA.Manufacturer00 AS [SystemManufacturer], dbo.Computer_System_DATA.Model00 AS [SystemModel], dbo.PC_BIOS_DATA.SerialNumber00 AS [ServiceTag], dbo.PC_Memory_DATA.TotalPhysicalMemory00 / (1000) / (1000) AS [MemoryGB], dbo.disk_data.Size00 * (1024) * (1024) / (1000000000) AS [HDDGB], dbo.System_Enclosure_DATA.ChassisTypes00, dbo.PC_BIOS_DATA.SMBIOSBIOSVersion00 AS [SMBIOSVersion], dbo.Logical_Disk_DATA.DriveType00, dbo.disk_data.MediaType00, (select Top 1 dbo.v_R_User.employeeID from dbo.v_UsersPrimaryMachines, dbo.v_R_User, dbo.v_R_System, dbo.User_DISC WHERE dbo.v_UsersPrimaryMachines.UserResourceID = dbo.v_R_User.ResourceID and dbo.v_UsersPrimaryMachines.MachineID = dbo.v_R_System.ResourceID and dbo.v_R_System.Name0 = dbo.System_DISC.Netbios_Name0 and dbo.v_R_User.Name0 = dbo.User_DISC.Name0) AS [PrimaryUser] from dbo.System_DISC, dbo.User_DISC, dbo.Operating_System_DATA, dbo.System_Enclosure_DATA, dbo.PC_BIOS_DATA, dbo.PC_Memory_DATA, dbo.Disk_DATA, dbo.Logical_Disk_DATA, dbo.Computer_System_DATA WHERE 1=1

    AND dbo.System_Enclosure_DATA.ChassisTypes00 IN (8, 9, 10, 14, 32) and dbo.Logical_Disk_DATA.DriveType00 = 3 and dbo.disk_data.MediaType00 = 'Fixed hard disk media' and dbo.system_disc.ItemKey = dbo.Operating_System_DATA.MachineID and dbo.System_DISC.User_Name0 = dbo.User_DISC.User_Name0 and dbo.system_disc.ItemKey = dbo.Computer_System_DATA.MachineID and dbo.system_disc.ItemKey = dbo.PC_Memory_DATA.MachineID and dbo.system_disc.ItemKey = dbo.PC_BIOS_DATA.MachineID and dbo.system_disc.ItemKey = dbo.Logical_Disk_DATA.MachineID and dbo.system_disc.ItemKey = dbo.Disk_DATA.MachineID and dbo.system_disc.ItemKey = dbo.System_Enclosure_DATA.MachineID

  3. On testing asset importing from SCCM I have been having some problems with missing/blank fields.

    I am starting with a very basic SQL query which I have tested in the SQL Server Management Studio directly on the server that SCCM sits and have been able to query/return the desired data. The basic data I want to test with is just pulling the MachineName. I am also limiting the amount of data to import to one record (as you will see below). I have added the query in to the JSON file and ran a test - it runs without errors. I have done a live import but it doesn't populate the MachineName field in Hornbill. I have also tried added a few more fields to the query in case the data is too small but nothing imports apart from a blank record.

    Here is the data - 

    "Query": "SELECT sys.Netbios_Name0 AS [MachineName] FROM cm_int.dbo.System_DISC sys"
    },
    "AssetTypes": [{
    "AssetType": "Laptop - TEST ONLY",
    "Query": "where sys.Netbios_Name0 = 'laptop name'",
    "AssetIdentifier": {
    "DBColumn": "MachineName",
    "Entity": "Asset",
    "EntityColumn": "h_name"
    }
    }
    ],
    "AssetGenericFieldMapping": {
    "h_name": "[MachineName]",
    "h_site": "",
    "h_asset_tag": "",
    "h_acq_method": "",
    "h_actual_retired_date": "",
    "h_beneficiary": "",
    "h_building": "",
    "h_cost": "",
    "h_cost_center": "",
    "h_country": "",
    "h_created_date": "",
    "h_deprec_method": "",
    "h_deprec_start": "",
    "h_description": "",
    "h_disposal_price": "",
    "h_disposal_reason": "",
    "h_floor": "",
    "h_geo_location": "",
    "h_invoice_number": "",
    "h_location": "",
    "h_location_type": "",
    "h_maintenance_cost": "",
    "h_maintenance_ref": "",
    "h_notes": "",
    "h_operational_state": "",
    "h_order_date": "",
    "h_order_number": "",
    "h_owned_by": "",
    "h_product_id": "",
    "h_received_date": "",
    "h_residual_value": "",
    "h_room": "",
    "h_scheduled_retire_date": "",
    "h_supplier_id": "",
    "h_supported_by": "",
    "h_used_by": "",
    "h_version": "",
    "h_warranty_expires": "",
    "h_warranty_start": ""
    },
    "AssetTypeFieldMapping": {
    "h_name": "[MachineName]",
    "h_mac_address": "",
    "h_net_ip_address": "",
    "h_net_computer_name": "",
    "h_net_win_domain": "",
    "h_model": "",
    "h_manufacturer": "",
    "h_cpu_info": "",
    "h_description": "",
    "h_last_logged_on": "",
    "h_last_logged_on_user": "",
    "h_memory_info": "",
    "h_net_win_dom_role": "",
    "h_optical_drive": "",
    "h_os_description": "",
    "h_os_registered_to": "",
    "h_os_serial_number": "",
    "h_os_service_pack": "",
    "h_os_type": "",
    "h_os_version": "",
    "h_physical_disk_size": "",
    "h_serial_number": "",
    "h_cpu_clock_speed": "",
    "h_physical_cpus": "",
    "h_logical_cpus": "",
    "h_bios_name": "",
    "h_bios_manufacturer": "",
    "h_bios_serial_number": "",
    "h_bios_release_date": "",
    "h_bios_version": "",
    "h_max_memory_capacity": "",
    "h_number_memory_slots": "",
    "h_net_name": "",
    "h_subnet_mask": ""
    }
    }

    Hornbill import 1.PNG

  4. I understand that we can import mobile phones and tablets from Intune. Does anyone have any experience of doing this? Do we use a JSON file in the same way we would from SCCM? If so what information would we need to input for the APIKey, Instance ID, Driver, Server etc as this is a cloud-based system and doesn't have a specific SQL server to connect to. These particular details don't exist.

    Any help would be great to get me started.

  5. I have imported assets via CSV successfully. If I want to make changes to the assets I've already uploaded via another CSV file how do I get them to update? I have tested this and because they are the same assets it doesn't import or update the fields/data because the entry/asset already exists.

    Is it possible to upload a new CSV file to update/sync the asset information that is already there via another CSV file or do you need to delete the asset import again fresh?

    Thanks

  6. Am testing the asset section and am looking at the asset list columns. I have hidden certain fields when data is input so that only relevant details are entered yet when you view a list of assets, all the fields remain. I know you can remove columns in the view by clicking the cog/customize columns and removing or re-ordering them. Is there a way to remove some and save a profile like you can in the request list? Would be useful to save a profile and push this out to all users rather than having each user customize their own columns, many of which will be empty. In the attached image there are many empty columns that I want to be removed by default.

    Thanks

    Asset columns.PNG

×
×
  • Create New...