Import CSV file Excel

Do you have a CSV, that you want to have more readable?
That’s easy to import it to Excel and transform it into a more readable file.
Just follow these steps.
Good luck.

How to import CSV file into Excel

You have Excel file that you want to be more readable in Excel
Open clean excel sheet (blank)

Under tab Data, you can find

New windows are just to click ok then you are done.

Computer branding with PDQ

Hey
What do you say we give it a shot and try to do computer branding with PDQ?

Here you have a code you can try to experiment with.

More information about $location check out this post, there you can read how to fetch the information and import it into PDQ Inventory database.

$location = "where you want to store CSV file that PDQ will fetch from"
$localLocation "where you want to store local txt file"

#Featch Values
function MenuGui()
{
#To use the .NET functionality to create forms, we use the class System.Windows.Forms. To load this class into a PowerShell session, you can use the following code:
Add-Type -assembly System.Windows.Forms

#Now create the screen form (window)
$main_form = New-Object System.Windows.Forms.Form

#Set the title and size of the window:
$main_form.Text ='Helpdesk'
$main_form.Width = 400
$main_form.Height = 50

#To make the form automatically stretch, if the elements on the form are out of bounds, we use the AutoSize property.
$main_form.AutoSize = $true

#Create a label element on the form about user name
$Label = New-Object System.Windows.Forms.Label
$Label.Text = "User: " + $WhoAmI
$Label.Location  = New-Object System.Drawing.Point(150,10)
$Label.AutoSize = $true
$main_form.Controls.Add($Label)

#Create a secound label element on the form about computer name
$Label2 = New-Object System.Windows.Forms.Label
$Label2.Text = "Computer name: " + $Hostname  
$Label2.Location  = New-Object System.Drawing.Point(150,25)
$Label2.AutoSize = $true
$main_form.Controls.Add($Label2)

  # Add Button 1
    $Button = New-Object System.Windows.Forms.Button
    $Button.Location = New-Object System.Drawing.Size(150,45)
    $Button.Size = New-Object System.Drawing.Size(145,23)
    $Button.Text = "Change Owner"
    $main_form.Controls.Add($Button)
  
  #Add close form function to the button, when you click
        $Button.add_click({
        $employees = @($Hostname+","+$WhoAmI)
        $employees | foreach { Add-Content -Path $locationv -Value $_ }
        New-Item -Path $localLocation\ -Name "Owner.txt" -ItemType "file" -Value $env:UserName -Force
        $main_form.Close()})

    
#Create a label element on the form about user name
$Label3 = New-Object System.Windows.Forms.Label
$Label3.Text = "You get this message for our systems says someone else is the owner of this computer`n then the user who is logged in. Please press Change Owner if its incorrect`n`nIf any question contact us on Phone: XXX, Email: xxx@xxx.com "
$Label3.Location  = New-Object System.Drawing.Point(1,80)
$Label3.AutoSize = $true
$main_form.Controls.Add($Label3)
  

#Now you can display the form on the screen.
$main_form.ShowDialog()
}

#Variable
$Hostname = $env:COMPUTERNAME
$WhoAmI = $env:UserName


$WantFile = "$localLocation\Owner.txt"
$FileExists = Test-Path $WantFile
If ($FileExists -eq $True) 
{
    Write-Host "Yippee file exist"
}

Else 
{
    New-Item -Path $localLocation\ -Name "Owner.txt" -ItemType "file" -Value $env:UserName -Force
    $employees = @($Hostname+","+$WhoAmI)
    $employees | foreach { Add-Content -Path $location -Value $_ }
    Write-Host "NO! File do not exist"
}


$textfile = Get-Content -Path $localLocation\Owner.txt

if($textfile -eq $env:UserName)
{
  echo "True value, do not run the script";
}
else
{
    echo "wrong value, please run the script";
    MenuGui
}

Enjoy!


Import data to PDQ Inventory

Do you have external data you want to import to PDQ Inventory?

With the help of this PHP code, you can do this.


$TempFile = "specify where the file is located"
$Computer = "Name"
$CustomFieldName = "Owner"
$CustomFieldType = "String" # Valid types - Boolean, String, Integer, Date, or DateTime
PDQInventory.exe ImportCustomFields -FileName $TempFile -ComputerColumn $Computer -CustomFields "$CustomFieldName=$CustomFieldName" -AllowOverwrite

A good place to find help is PDQ Community