🤘 0 reputation

Craig582

Standard

Joined: 10/4/2017

Last seen: 6/7/2019

Activity
  • Feature request
  • This works. It's probably not the best way of doing this.

    $user = "$env:USERNAME";
    $group = "Administrators";
    $groupObj =[ADSI]"WinNT://./$group,group" 
    $membersObj = @($groupObj.psbase.Invoke("Members")) 
    
    $members = ($membersObj | foreach {$_.GetType().InvokeMember("Name", 'GetProperty', $null, $_, $null)})
    
    $ErrorActionPreference = 'Continue'
    
    If ($members -contains $user) {
    $exists = $true
    } Else {
    $exists = $false
    }
    
    Write-Host "$exists"
    
    $computer = $env:COMPUTERNAME
    
    $customfieldname = "Admin?"
    $Customfieldtype = "String"
    
     $computerlist = @("ComputerName,$customfieldname")
    
     $computer | ForEach-Object {
    
    $computerlist += "$_,$exists"
    
    }
    
    pdqinventory createcustomfield -name $customfieldname -type $customfieldtype
    $tempfile = New-TemporaryFile
    $computerlist | out-file $tempfile
    
    pdqinventory importcustomfields -filename $tempfile -computercolumn "ComputerName" -customfields "$Customfieldname=$customfieldname" -allowoverwrite
    
  • The best way I can think of doing this is having a login script GPO, that runs a PowerShell script. This PowerShell script checks the current user against the members of the local admins and then imports that data into a custom field for that PC in Inventory.

    If I get some time spare today, I'll have a play with PowerShell and see if I can get something working.

  • $env:username if using PowerShell

  • Deleted WMI Scanners aren't completely disappearing
  • We have a copy of the script set to export to our own desktop. This is at the start of the script. There are probably better ways of doing this.

    $folder = 'logins'
    Write-Host ""
    $Path = "$env:userprofile\desktop"
    Set-Location -path $Path
    
    If((Test-Path $folder)-eq $True){ #if folder exists
    Write-Host -ForegroundColor Yellow "$Folder folder cannot be created at $Path - as it already exists"
    }
    Else{ #if folder doesn't exist
    New-Item -Path $Folder -ItemType "Directory" | Out-Null
    Write-Host -ForegroundColor Green "$Folder created at $path"
    }
    $Logins = "$Path\$Folder" 
    

    Then this is added onto the last line

    | out-file $logins\$(Computer:TARGET).txt 
    
  • Weird PowerShell error
  • Apologies for not replying sooner. I didn't get any emails to say that there was a response. I will put something together and send it off.

  • Inventory Powershell replaced with CMD
  • Same issue in version 16.3.0.0. This is quite the annoyance.

  • Thanks so much for this!

  • Meltdown-spectre patch collections
  • My apologies for not doing this sooner, but I should probably explain the backstory/context to this. We are a secondary school in the UK, and iTALC is classroom monitoring software. When I talk about configuring iTALC, I am talking about the relevant registry keys that set the authenticated users (all staff). iTALC Master is the actual viewer that sits on the teacher PC in each computer room, allowing the teacher to view the student's screen.

    The registry keys have to be applied to all machines, whether they are a master (this sets who can log in to the software), or a student pc (this sets who can see the screen). So all the machines would have the registry configured but not all would have the master application installed. Obviously, all of the machines would at least have the very basic level of iTALC installed.

    Not all machines have the master application installed or are even configured need to have the things on there, this is extra PCs like our Digital Signage PCs have the slave installed, also those in my department have the master installed. Though these two examples are nice to know they're there, it's not something that I'm going to worry about if it's not there.

    As for the not ready for service collection, that is a collection that feeds back on lots of other collections that report on  computers that don't have required things configured.installed (e.g. wrong driver for WoL), if I see a PC in the not ready for service collection, I can then drill down into the subcollections below, and work out what is wrong, without having to search around the whole of my PDQ console. 

  • <?xml version="1.0" encoding="utf-8"?>
    <AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="14.1.0.8" MinimumVersion="4.0">
    <Collection>
    <ReportDefinition name="Definition">
    <RootFilter name="Filter">
    <Comparison>All</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    </ValueFilter>
    </Filters>
    </RootFilter>
    <ReportDefinitionTypeName>BasicReportDefinition</ReportDefinitionTypeName>
    <Columns type="list">
    <Column>
    <Column>ComputerId</Column>
    <Summary></Summary>
    <Table>Computer</Table>
    <Title></Title>
    </Column>
    </Columns>
    </ReportDefinition>
    <IsDrilldown value="false" />
    <Created>2017-11-22T14:48:32.0000000+00:00</Created>
    <Description></Description>
    <Error></Error>
    <Id value="1697" />
    <ImportedPath>To export</ImportedPath>
    <Modified>2017-11-22T14:48:48.0000000+00:00</Modified>
    <Name>To export</Name>
    <ParentId value="null" />
    <Path>To export</Path>
    <TypeName>DynamicCollection</TypeName>
    <Type>DynamicCollection</Type>
    <Children type="list">
    <Collection>
    <ReportDefinition name="Definition">
    <RootFilter name="Filter">
    <Comparison>All</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Collection</Table>
    <Column>Path</Column>
    <Comparison>StartsWith</Comparison>
    <Value>To export\Not ready for service\</Value>
    </ValueFilter>
    </Filters>
    </RootFilter>
    <ReportDefinitionTypeName>BasicReportDefinition</ReportDefinitionTypeName>
    <Columns type="list">
    <Column>
    <Column>ComputerId</Column>
    <Summary></Summary>
    <Table>Computer</Table>
    <Title></Title>
    </Column>
    </Columns>
    </ReportDefinition>
    <IsDrilldown value="false" />
    <Created>2017-11-22T14:48:56.0000000+00:00</Created>
    <Description></Description>
    <Error></Error>
    <Id value="1698" />
    <ImportedPath>To export\Not ready for service</ImportedPath>
    <Modified>2017-11-22T14:58:28.0000000+00:00</Modified>
    <Name>Not ready for service</Name>
    <ParentId value="1697" />
    <Path>To export\Not ready for service</Path>
    <TypeName>DynamicCollection</TypeName>
    <Type>DynamicCollection</Type>
    <Children type="list">
    <Collection>
    <ReportDefinition name="Definition">
    <RootFilter name="Filter">
    <Comparison>All</Comparison>
    <Filters type="list">
    <GroupFilter>
    <Comparison>All</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Registry</Table>
    <Column>Name</Column>
    <Comparison>!Contains</Comparison>
    <Value>LogonACL</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Registry</Table>
    <Column>Value</Column>
    <Comparison>!Equals</Comparison>
    <Value>AgAsAAEAAAAAACQAAwAAAAEFAAAAAAAFFQAAAFRFe0gzFvYVMNqZu7AjAAA</Value>
    </ValueFilter>
    </Filters>
    </GroupFilter>
    <GroupFilter>
    <Comparison>Any</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Collection</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    <Value>Student Computers</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Collection</Table>
    <Column>Name</Column>
    <Comparison>Equals</Comparison>
    <Value>iTALC Master</Value>
    </ValueFilter>
    </Filters>
    </GroupFilter>
    <GroupFilter>
    <Comparison>NotAny</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    <Value>ASCOMP</Value>
    </ValueFilter>
    </Filters>
    </GroupFilter>
    <GroupFilter>
    <Comparison>NotAny</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Collection</Table>
    <Column>Name</Column>
    <Comparison>Equals</Comparison>
    <Value>iTALC Registry Configured</Value>
    </ValueFilter>
    </Filters>
    </GroupFilter>
    </Filters>
    </RootFilter>
    <ReportDefinitionTypeName>BasicReportDefinition</ReportDefinitionTypeName>
    <Columns type="list">
    <Column>
    <Column>ComputerId</Column>
    <Summary></Summary>
    <Table>Computer</Table>
    <Title></Title>
    </Column>
    </Columns>
    </ReportDefinition>
    <IsDrilldown value="false" />
    <Created>2017-11-17T14:17:16.0000000+00:00</Created>
    <Description>Registry not configured with the relevant keys for iTALC Authentication but should be</Description>
    <Error></Error>
    <Id value="1695" />
    <ImportedPath>To export\Not ready for service\ITALC Registry not configured</ImportedPath>
    <Modified>2017-11-22T14:49:06.0000000+00:00</Modified>
    <Name>ITALC Registry not configured</Name>
    <ParentId value="1698" />
    <Path>To export\Not ready for service\ITALC Registry not configured</Path>
    <TypeName>DynamicCollection</TypeName>
    <Type>DynamicCollection</Type>
    <Children type="list" />
    </Collection>
    <Collection>
    <ReportDefinition name="Definition">
    <RootFilter name="Filter">
    <Comparison>All</Comparison>
    <Filters type="list">
    <GroupFilter>
    <Comparison>NotAny</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Collection</Table>
    <Column>Name</Column>
    <Comparison>Equals</Comparison>
    <Value>iTALC Master installed</Value>
    </ValueFilter>
    </Filters>
    </GroupFilter>
    <GroupFilter>
    <Comparison>Any</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Collection</Table>
    <Column>Name</Column>
    <Comparison>Equals</Comparison>
    <Value>iTALC Master</Value>
    </ValueFilter>
    </Filters>
    </GroupFilter>
    </Filters>
    </RootFilter>
    <ReportDefinitionTypeName>BasicReportDefinition</ReportDefinitionTypeName>
    <Columns type="list">
    <Column>
    <Column>ComputerId</Column>
    <Summary></Summary>
    <Table>Computer</Table>
    <Title></Title>
    </Column>
    </Columns>
    </ReportDefinition>
    <IsDrilldown value="false" />
    <Created>2017-11-07T15:18:17.0000000+00:00</Created>
    <Description>iTALC Master application not installed but should be</Description>
    <Error></Error>
    <Id value="1696" />
    <ImportedPath>To export\Not ready for service\iTALC Master not installed</ImportedPath>
    <Modified>2017-11-22T14:49:06.0000000+00:00</Modified>
    <Name>iTALC Master not installed</Name>
    <ParentId value="1698" />
    <Path>To export\Not ready for service\iTALC Master not installed</Path>
    <TypeName>DynamicCollection</TypeName>
    <Type>DynamicCollection</Type>
    <Children type="list" />
    </Collection>
    </Children>
    </Collection>
    <Collection>
    <ReportDefinition name="Definition">
    <RootFilter name="Filter">
    <Comparison>Any</Comparison>
    <Filters type="list">
    <GroupFilter>
    <Comparison>All</Comparison>
    <Filters type="list">
    <GroupFilter>
    <Comparison>Any</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>03</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>05</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>10</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>110</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>115</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>15</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>16</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>211</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>310</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>316</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>41</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>44</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>50</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>56</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>61</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>68</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>70</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>71</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>73</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>80</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>81</Value>
    </ValueFilter>
    </Filters>
    </GroupFilter>
    <GroupFilter>
    <Comparison>All</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    <Value>TEACHER</Value>
    </ValueFilter>
    </Filters>
    </GroupFilter>
    </Filters>
    </GroupFilter>
    <GroupFilter>
    <Comparison>Any</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    <Value>STUDY-ADMIN</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    <Value>A-STU-DHOH</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    <Value>A-SIX-HOH</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    <Value>A-SIX-ADMIN</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    <Value>A-LULS-LIB-1</Value>
    </ValueFilter>
    </Filters>
    </GroupFilter>
    </Filters>
    </RootFilter>
    <ReportDefinitionTypeName>BasicReportDefinition</ReportDefinitionTypeName>
    <Columns type="list">
    <Column>
    <Column>ComputerId</Column>
    <Summary></Summary>
    <Table>Computer</Table>
    <Title></Title>
    </Column>
    </Columns>
    </ReportDefinition>
    <IsDrilldown value="false" />
    <Created>2017-11-08T10:54:20.0000000+00:00</Created>
    <Description>Computers that should have the iTALC master application installed</Description>
    <Error></Error>
    <Id value="1700" />
    <ImportedPath>To export\iTALC Master</ImportedPath>
    <Modified>2017-11-22T14:56:35.0000000+00:00</Modified>
    <Name>iTALC Master</Name>
    <ParentId value="1697" />
    <Path>To export\iTALC Master</Path>
    <TypeName>DynamicCollection</TypeName>
    <Type>DynamicCollection</Type>
    <Children type="list">
    <Collection>
    <ReportDefinition name="Definition">
    <RootFilter name="Filter">
    <Comparison>All</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>File</Table>
    <Column>Name</Column>
    <Comparison>Equals</Comparison>
    <Value>italc.exe</Value>
    </ValueFilter>
    </Filters>
    </RootFilter>
    <ReportDefinitionTypeName>BasicReportDefinition</ReportDefinitionTypeName>
    <Columns type="list">
    <Column>
    <Column>ComputerId</Column>
    <Summary></Summary>
    <Table>Computer</Table>
    <Title></Title>
    </Column>
    </Columns>
    </ReportDefinition>
    <IsDrilldown value="false" />
    <Created>2017-11-07T15:16:46.0000000+00:00</Created>
    <Description>iTALC Master application installed</Description>
    <Error></Error>
    <Id value="1701" />
    <ImportedPath>To export\iTALC Master\iTALC Master installed</ImportedPath>
    <Modified>2017-11-15T10:57:32.0000000+00:00</Modified>
    <Name>iTALC Master installed</Name>
    <ParentId value="1700" />
    <Path>To export\iTALC Master\iTALC Master installed</Path>
    <TypeName>DynamicCollection</TypeName>
    <Type>DynamicCollection</Type>
    <Children type="list" />
    </Collection>
    <Collection>
    <ReportDefinition name="Definition">
    <RootFilter name="Filter">
    <Comparison>All</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Registry</Table>
    <Column>Value</Column>
    <Comparison>Equals</Comparison>
    <Value>AgAsAAEAAAAAACQAAwAAAAEFAAAAAAAFFQAAAFRFe0gzFvYVMNqZu7AjAAA=</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Registry</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    <Value>LogonACL</Value>
    </ValueFilter>
    </Filters>
    </RootFilter>
    <ReportDefinitionTypeName>BasicReportDefinition</ReportDefinitionTypeName>
    <Columns type="list">
    <Column>
    <Column>ComputerId</Column>
    <Summary></Summary>
    <Table>Computer</Table>
    <Title></Title>
    </Column>
    </Columns>
    </ReportDefinition>
    <IsDrilldown value="false" />
    <Created>2017-11-08T12:01:16.0000000+00:00</Created>
    <Description>Registry configured with the relevnt keys for iTALC Authentication</Description>
    <Error></Error>
    <Id value="1702" />
    <ImportedPath>To export\iTALC Master\iTALC Registry configured</ImportedPath>
    <Modified>2017-11-15T10:57:32.0000000+00:00</Modified>
    <Name>iTALC Registry configured</Name>
    <ParentId value="1700" />
    <Path>To export\iTALC Master\iTALC Registry configured</Path>
    <TypeName>DynamicCollection</TypeName>
    <Type>DynamicCollection</Type>
    <Children type="list" />
    </Collection>
    </Children>
    </Collection>
    <Collection>
    <ReportDefinition name="Definition">
    <RootFilter name="Filter">
    <Comparison>All</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Computer</Table>
    <Column>OSName</Column>
    <Comparison>Contains</Comparison>
    <Value>Microsoft Windows</Value>
    </ValueFilter>
    <GroupFilter>
    <Comparison>NotAny</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    <Value>TEACHER</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    <Value>WR</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    <Value>ADMIN</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>Contains</Comparison>
    <Value>IT-</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>L-</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>Name</Column>
    <Comparison>StartsWith</Comparison>
    <Value>A-</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Computer</Table>
    <Column>OSName</Column>
    <Comparison>Contains</Comparison>
    <Value>Server</Value>
    </ValueFilter>
    </Filters>
    </GroupFilter>
    </Filters>
    </RootFilter>
    <ReportDefinitionTypeName>BasicReportDefinition</ReportDefinitionTypeName>
    <Columns type="list">
    <Column>
    <Column>ComputerId</Column>
    <Summary></Summary>
    <Table>Computer</Table>
    <Title></Title>
    </Column>
    </Columns>
    </ReportDefinition>
    <IsDrilldown value="false" />
    <Created>2017-07-18T12:17:06.0000000+01:00</Created>
    <Description></Description>
    <Error></Error>
    <Id value="1703" />
    <ImportedPath>To export\Student Computers</ImportedPath>
    <Modified>2017-09-20T12:47:14.0000000+01:00</Modified>
    <Name>Student Computers</Name>
    <ParentId value="1697" />
    <Path>To export\Student Computers</Path>
    <TypeName>DynamicCollection</TypeName>
    <Type>DynamicCollection</Type>
    <Children type="list" />
    </Collection>
    </Children>
    </Collection>
    </AdminArsenal.Export>
  • I have it all exported. I just don't know how to upload it.

  • Hi Luke, yes my ultimate goal is two have two dynamic collections (though 2 for the registry and 2 for the file). The problem with drilling down is that the collection for 'not there' is part of a group of a dynamic collection, where the parent collection contains all the computers from the sub-collections below it.

    Not sure whether it is any use or not, but here are the 'installed' collections.

    With the 'not there' collections, I am only worried about the computers that are supposed to have the registry keys/file there but don't.

  • I need help make these collections better - help!
  • Scan Profile Age collection
  • My apologies, it seems that the trigger was removed. When I first noticed the issue the other day, the trigger was still there. If the issue persists, I'll email support.

  • Scan Age doesn't seem to work correctly