/build/static/layout/Breadcrumb_cap_w.png

What is the best and easist way to group all the existing machines and software on the K1000 by department for hardware and software assest tracking reporting

We have been tasked to group everything in the Kace1000 to departments for assest tracking and billing purposes.  They want to be able to add a parameter to some reports that will group either hardware or software by department.  We have discussed labels (a lot of work and upkeep), and adding a department entry in the computer descriptions field for the windows 7 machines but will not cover the mac's.


0 Comments   [ + ] Show comments

Answers (4)

Answer Summary:
Posted by: dugullett 11 years ago
Red Belt
3

This will do the same thing, but use a drop down for departments instead.

 

# Edit This item to change the DropDown Values

 

[array]$DropDownArray = "Finance", "IT", "HR"

 

function Return-DropDown {

 

$Choice = $DropDown.SelectedItem.ToString()

$Form.Close()

# Edit for registy path

    New-Item -Path HKLM:\Software\KACE\Dept -Value $choice –Force

 

}

 

[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")

[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")

 

$Form = New-Object System.Windows.Forms.Form

 

$Form.width = 300

$Form.height = 150

$Form.Text = ”Select Department”

 

$DropDown = new-object System.Windows.Forms.ComboBox

$DropDown.Location = new-object System.Drawing.Size(100,10)

$DropDown.Size = new-object System.Drawing.Size(130,30)

 

ForEach ($Item in $DropDownArray) {

$DropDown.Items.Add($Item)

}

 

$Form.Controls.Add($DropDown)

 

$DropDownLabel = new-object System.Windows.Forms.Label

$DropDownLabel.Location = new-object System.Drawing.Size(10,10)

$DropDownLabel.size = new-object System.Drawing.Size(100,20)

$DropDownLabel.Text = "Departments"

$Form.Controls.Add($DropDownLabel)

 

$Button = new-object System.Windows.Forms.Button

$Button.Location = new-object System.Drawing.Size(100,50)

$Button.Size = new-object System.Drawing.Size(100,40)

$Button.Text = "Select a Department"

$Button.Add_Click({Return-DropDown})

$form.Controls.Add($Button)

 

$Form.Add_Shown({$Form.Activate()})

$Form.ShowDialog()

Comments:
  • Thanks you saved me a ton of time, hopefully I can return the help sometime. - SMal.tmcc 11 years ago
Posted by: dugullett 11 years ago
Red Belt
2

I'll probably use some form of this. With Powershell. This will prompt the user, and set the reg key based on what they select. Now hopefully they know what department they are in.

$title = "Message from Admin"
$message = "Please Select Your Department"
$Finance = New-Object System.Management.Automation.Host.ChoiceDescription "&Finance", `

    "Sets Finance as Department"

$IT = New-Object System.Management.Automation.Host.ChoiceDescription "&IT", `

    "Sets IT as Department."

$HR = New-Object System.Management.Automation.Host.ChoiceDescription "&HR", `

    "Sets HR as Department."

$Maintenance = New-Object System.Management.Automation.Host.ChoiceDescription "&Maintenance", `

    "Sets Maintenance as Department"

$options = [System.Management.Automation.Host.ChoiceDescription[]]($Finance, $IT, $HR, $Maintenance)

$result = $host.ui.PromptForChoice($title, $message, $options, 0) 

switch ($result)

    {  0 {New-Item -Path HKLM:\Software\KACE\Dept -Value Finance –Force}
 1 {New-Item -Path HKLM:\Software\KACE\Dept -Value IT –Force}
        2 {New-Item -Path HKLM:\Software\KACE\Dept -Value HR –Force}

        3 {New-Item -Path HKLM:\Software\KACE\Dept -Value Maintenance –Force}

    }
 

Comments:
  • I just need a way to do a ldap read to AD I could pull their deparment from there. We set our AD fields from Human Resources thru a Peoplesoft connector. Hey thanks for the code. It has been years since I really wrote a lot of code, I am the only one who knows the K2000 and I am teir 3 hardware/software specialist so does not leave a lot of time to work on code. - SMal.tmcc 11 years ago
    • Something like this should work for that. I cannot currently test this in my environment. So make sure you do before deploying.

      import-module ActiveDirectory
      $dept= Get-ADUser -identity $env:username -properties Department
      New-Item -Path HKLM:\Software\KACE\Dept -Value $dept –Force - dugullett 11 years ago
  • vb or powershell? - SMal.tmcc 11 years ago
    • Powershell - dugullett 11 years ago
      • That will query AD with the current user credentials for their Department. Then set the reg key based on Deparment field. It does require "Active Directory Web Services". That's the reason I haven't tested it. - dugullett 11 years ago
  • need to check with server crew to see if that is running. - SMal.tmcc 11 years ago
Posted by: chucksteel 11 years ago
Red Belt
2

We bit the bullet and organized our Active Directory OUs according to department. I then created the necessary LDAP labels based on those OUs. It took a lot of time up front but it has been worth it in the long run. There have been other instances where having the departments "automatically updated" based on the OU have come in handy. For instance, we can easily make custom patch schedules for departments and as long as the machines are placed in the proper OU everything works smoothly. Moving the machine into the proper OU is part of our deployment workflow now so it happens 99% of the time.


Comments:
  • Our OU's are structured by site/location. We do have machine groups for a lot of the departments because of using GPO's to push the network printers for the departments. Also we have user security groups for the departments. We do populate the Department field in AD from peoplesoft so it stays current. - SMal.tmcc 11 years ago
Posted by: dugullett 11 years ago
Red Belt
1

Do you already have the asset info in a csv, or will you be flying blind?


Comments:
  • Flying blind, new project, we have student workers answering phones, so entry work is possible in between calls - SMal.tmcc 11 years ago
  • We do have software usage license's in excell by department for the big ones - SMal.tmcc 11 years ago
    • I'm about to have to go through almost the same thing. I've thought about making a .reg file that will populate a key with the dept. Then have Kace inventory that key. I guess the hard part is getting it out there. I don't guess you have separate images for dept? - dugullett 11 years ago
      • If you have the departments segmented by IP address, you could use a regex argument to limit your install by IP address range: http://www.kace.com/support/resources/kb/article/Tool-to-assist-in-building-REGEX-Inventory - jknox 11 years ago
  • No two images only for admin one 32 one 64.
    I was looking a using a phone person to run a utility from pstools (psexec) and creating a little c++ menu that you put the machine name in choose the department from a dropdown and let it attach to the box and change the registry key remotely - SMal.tmcc 11 years ago
    • I'm sure you could probably work that into a post install task as well. - dugullett 11 years ago
      • We will put the menu on a server and call it as a runonce so the tech will not spell the departments wrong. With it on the server we can update when needed.
        Do not know if you ever used psexec, it is powerful and can be dangerous
        http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
        http://www.windowsecurity.com/articles/PsExec-Nasty-Things-It-Can-Do.html - SMal.tmcc 11 years ago
  • We will have staff set the key when they deploy any new image as part of the replacement proceedure. - SMal.tmcc 11 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ