
Kenknuds asked a question.

Kenknuds asked a question.


RobG01 asked a question.


johnsto23 asked a question.
Hello,
New to the forum so please be gentle. We have recently starting deploying Windows 10 machines and they have the SNOW Inventory client installed on them and reporting back OK. Since we deploy now deploy all applications to client machines via SCCM I was hoping that the SNOW LM interface was able to give me an 'All Applications' report but with the criteria of the client OS being Windows 10. Is this possible?
Thanks
Lee

SCCM - Add Device Collection with RuleQuery
We recently had a problem in the collection population with RuleDirect, which is that to install or reinstall a new operating system, the computer needs to be removed from SCCM. The impact of this on the implementation of computers in collections with RuleDirect is excluded from the SCCM and also from the collection and even after the installation of the new operating system the computer did not return to collection anymore. To solve this issue, we started to implement the inclusion of new computers in the collection based on RuleQuery. Below is an excerpt of the code we use to perform this implementation. param( [Parameter(Mandatory=$true)][string]$SCCMUserName, [Parameter(Mandatory=$true)][string]$SCCMServer, [Parameter(Mandatory=$true)][string]$SCCMSiteCode, [Parameter(Mandatory=$true)][string]$ComputerDevice, [Parameter(Mandatory=$true)][string]$CollectionID ) $SCCMServiceAccountName = Get-APSetting SCCMServiceAccountName $SCCMServiceAccount = Get-ServiceAccount -Name $SCCMServiceAccountName -Scope 0 $SCCMServiceAccountPassword = $SCCMServiceAccount.Password | ConvertTo-SecureString -AsPlainText -Force $Credentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $SCCMUserName,$SCCMServiceAccountPassword $ParamConnectSCCM = [ordered]@{ "NameSpace" = "Root\SMS\Site_$SCCMSiteCode" "ComputerName" = $SCCMServer "Credential" = $Credentials "ErrorAction" = 'Stop' } ### ComputerDevice Validation ### try{ if($ComputerDevice.Contains('\')){ $Domain = $ComputerDevice.Split('\')[0] $HostName = $ComputerDevice.Split('\')[1] $ComputerObj = @(Get-WmiObject -Class SMS_R_SYSTEM -Filter "Name = '$HostName' AND ResourceDomainORWorkgroup = '$Domain' AND Client = '1'" @ParamConnectSCCM) } else{ $ComputerObj = @(Get-WmiObject -Class SMS_R_SYSTEM -Filter "Name = '$ComputerDevice' AND Client = '1'" @ParamConnectSCCM) } if($ComputerObj.Count -gt 1){ Write-Error "Found more than one record with the name $ComputerDevice with attributes Client = 1" } if($ComputerObj.Count -eq 1){ Write-Host "The computer: $($ComputerObj.Name) was found with the following ID: $($ComputerObj.ResourceId)" } if($ComputerObj.Count -eq 0){ Write-Error "The computer: $($ComputerDevice) not found in SCCM" } } catch{ Write-Error "Error while browsing the computer $ComputerDevice. Exception: $($_. Exception.Message)" } ### CollectionID Validation ### try{ $CollectionObj = @(Get-WmiObject -Class SMS_Collection -Filter "CollectionID = '$CollectionID' AND CollectionType = 2" @ParamConnectSCCM) if($CollectionObj.Count -eq 1){ $CollectionObj = $CollectionObj[0] Write-Host "The Collection: $($CollectionObj.CollectionID) was found in SCCM with the name: $($CollectionObj.Name)." } if($CollectionObj.Count -eq 0){ Write-Error "The Collection: $($CollectionID) not found in SCCM" } if($CollectionObj.Count -gt 1){ Write-Error "Found more than one record with ID: $($CollectionID)." } } catch{ Write-Error "Error while browsing then collection $($CollectionID). Exception: $($_.Exception.Message)" } ### Include, Create and Update Collection ### $ArrayRules = @() $ArrayComputer = @() if($ComputerObj.Count -eq 1){ foreach($Collection in $CollectionObj){ $Collection.Get() $CollectionRule = $Collection.CollectionRules if($CollectionRule.Count -eq 0){ Write-Host "The collection $($CollectionObj.Name) does not have a RuleQuery created. The initial RuleQuery will be created." $FirstQuery = 'select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.NetbiosName in ("0",'+'"'+$ComputerObj.Name+'"'+')' try{ $FirstRule = (Get-WmiObject -List -Class SMS_CollectionRuleQuery @ParamConnectSCCM).CreateInstance() $FirstRule.QueryExpression = $FirstQuery $FirstRule.RuleName = $CollectionObj.Name $Collection.Put() | Out- if(($Collection.CollectionRules | Where-Object { ($_.RuleName -like "$($FirstRule.RuleName)") -and ($_.__CLASS -like "SMS_CollectionRuleQuery") } | Measure-Object).Count -eq 1){ Write-Host "QueryRule was successfully created. Name: '$($FirstRule.RuleName)' in collection '$($CollectionObj.Name)" $InvokeUpdate = $Collection.RequestRefresh() if($InvokeUpdate.ReturnValue -eq 0){ Write-Host "Installation | Added $($ComputerObj.Name) in collection $($CollectionObj.Name)." } else{ Write-Error "Failed to update collection $($CollectionObjInstall.Name)." } } } catch{ Write-Error "Failed to create RuleQuery instance. Exception: $($_.Exception.Message)" } } if($CollectionRule.Count -ne 0){ Write-Host "The collection $($CollectionObj.Name) has one or more associated Rule. A single RuleQuery containing all members will be created." foreach($Rule in $Collection.CollectionRules){ if($Rule.__CLASS -eq "SMS_CollectionRuleDirect"){ $ArrayRules += $Rule.RuleName } if($Rule.__CLASS -eq "SMS_CollectionRuleQuery"){ $Query = $Rule.QueryExpression $List = $Query.Split('()')[1].Split(',').Split(' ').Split('"',[System.StringSplitOptions]::RemoveEmptyEntries).Split('"', [System.StringSplitOptions]::RemoveEmptyEntries) $ArrayComputer += $List } } $NewArray = @() $NewArray = $ArrayRules + $ArrayComputer | select -Unique $NewArrayQuery = @() foreach($PC in $NewArray){ if($PC -notin 0){ $NovaArrayQuery += ',"'+$PC+'"' } } $NewArrayQuery += ',"'+$ComputerObj.Name+'"' $NewArrayQuery = $NewArrayQuery | select -Unique $Replace = 'select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.NetbiosName in ("0"'+$NewArrayQuery+')' Write-Host "New select associate ($Replace)" try{ $NewRule = (Get-WmiObject -List -Class SMS_CollectionRuleQuery @ParamConnectSCCM).CreateInstance() $NewRule.QueryExpression = $Replace $NewRule.RuleName = $CollectionObj.Name $Collection.Put() | Out- if(($Collection.CollectionRules | Where-Object { ($_.RuleName -like "$($NewRule.RuleName)") -and ($_.__CLASS -like "SMS_CollectionRuleQuery") } | Measure-Object).Count -eq 1){ Write-Host = "QueryRule was successfully created. Name: '$($NewRule.RuleName)' in collection '$($CollectionObj.Name)." $InvokeUpdate = $Collection.RequestRefresh() if($InvokeUpdate.ReturnValue -eq 0){ Write-Host "The Collection $($CollectionObj.Name) has been updated with the new RuleQuery, containing the new computer: $($ComputerObj.Name)." Write-Host "Installation | Added $($ComputerObj.Name) in collection $($CollectionObj.Name)." } else{ Write-Error "Failed to update collection $($CollectionObjInstall.Name)." } } } catch{ Write-Error "Failed to create RuleQuery instance. Exception: $($_.Exception.Message)" } } } }


mmarr asked a question.
We are using SNOW to locate unused software where the software has been installed at least 90 days. Then we use SCCM to remove the unused software. We are seeing in SCCM that the software install date is different than what SNOW is reporting. i.e. - we recommend removal of software A as SNOW shows it was installed in Nov 2017 and never used, but SCCM shows it was installed in Jun 2017 (and in some cases is being used).
What would cause the difference in install date detection?
Thanks, Matthew


Community Manager (Flexera Software)
AP: Re-harvesting Learnings
During a recent customer re-harvesting project a number of Q&A learnings have been captured, which maybe of use to the wider Snow AP community. Please note that each Q&A is applicable to SLM Vn.8.3 and AP Vn.3.4.1, enjoy!
SLM:
Q : Does un-selecting the "Available in Software Store" check box on the SLM "Store" tab exclude the application from re-harvesting?
A : Unselecting the “Available in Software Store” on the “Store” tab does not exclude the application from re-harvesting.
Q: In SLM, how can you exclude an application from re-harvesting?
A: To exclude an application from re-harvesting you must click on the “Uninstall Options” change button and select “No limited use”. You must then click “OK” and then “Save” (top section of the Ui). You can then either untick or keep the tick against “Available in Software Store”, it makes no difference to the re-harvesting SLM API end point.
Q: Should I be checking the SLM API re-harvesting end-point?
A: Yes, check the FQDNforSLM/api/customers/X/appstore/applications/reharvestable/ API end point after enabling / disabling an application for re-harvesting to confirm the correct records are returned / removed. This is especially important during testing when re-harvesting can often be initiated in quick succession.
Q: Are there any limits against the Identifier field on the "Store" tab in SLM?
A: The Identifier field on the SLM Store tab is limited to 64 characters, check values if you are copying and pasting into this field to ensure no truncation. The reason for the 64 character restriction is that the AD Schema limits Common Names, the values of the cn attribute, all objects (users, contacts, computers, groups) to 64 characters. As this field was originally designed to store AD Group names this constraint is fitting.
Q: Is the Identifier field strictly reserved for AD Group names?
A: It is possible to re-use the Identifier field and store e.g. - SCCM Collections if SCCM Collections are utilised for membership instead of AD Groups.
Q: Can Identifiers be shared across different applications in SLM?
A: Values entered into the Identifier field must be unique across the list of enabled application for re-harvesting in SLM and in some cases where e.g. - only a Uninstall Collection is required (or available) you will be forced into entering a dummy entry that should be ignored in the code, <dummy_install_id><delimiter><uninstall_id>, e.g. - C00001;C00002. This can happen if applications have been manually installed (no install package) and multiple versions of said application share a single uninstall package.
Q: Should I reference names or Ids?
A: It is better to use Identifiers, IDs, than say (SCCM Collection) Names as names can be changed over time.
Q: What is the default duration that usage stats are kept for in SLM?
A: By default SLM stores 90 days of usage stats, some customers may choose to increase this. Ensure that you familiarise yourself with the usage range you can work with, this is particularly applicable to "Uninstall settings for this application" --> "Uninstall this application based on usage" re-harvesting setting.
Q: What provisioning type can be used for re-harvesting based on usage?
A: Re-harvesting based on usage can only occur against devices (and not Users).
Q: Should I address duplicate records in SLM before, during or after re-harvesting?
A: Minimise complications as a consequence of duplicate devices (or users) in SLM and always ensure that any duplicates are resolved before AP re-harvesting schedules are triggered.
AP:
Q: At what point in the re-harvesting process should I apply exclusions?
A: Use the "reharvest slm applications" activity to filter out all exclusions before invoking the uninstall workflow. This will optimise the process and reduce the amount of times the uninstall workflow is called.
Q: Do I need to know and understand the existing uninstallation process?
A: Ensure you are familiar with the existing uninstallation process and the deployment technology that is employed to push uninstallation packages out. It is important to understand whether a device (or user) object needs to be added to a membership group in AD, or whether the process is more convoluted and the defined object should be removed from an Install Collection before being added to an Uninstall Collection. This will determine the Uninstall workflow activities.
Q: What information do I need in order to communicate with SCCM?
A: As a minimum ensure you have the following information to communicate with SCCM Server via wmi: Server Name, Site Code, Service Account e.g. - AP_WorkflowEngine.
Q: What permissions do I need in order to communicate with SCCM during software re-harvesting?
A: Ensure that the chosen service account e.g. - AP_WorkflowEngine service account has sufficient permissions in SCCM to make wmi calls, for verifying: Collections, Resources, Collection Membership. Sufficient permissions should also be granted for adding and removing resources to / from Collections but this should be restricted to only the Collections related to re-harvested applications. Targeted permissions are always safer, especially during automation procedures!
Q: When should I use exclusion Collections / Groups?
A: Consider using exclusion Collections / Groups for larger volumes of devices (or users) that should be excluded from re-harvesting for a given application.
Q: Are there any differences between the "Store" tab fields and custom fields?
A: The SLM Store tab field values are made available in the SLM re-harvesting API end-point against application and device / user records. If you are also reading custom field values from SLM, these will be accessible per application or device / user. This may impact how you use each field type value in your re-harvesting activity or how this data is stored to avoid repetition.
Q: Can I store custom information in the AP database/s?
A: No custom data or custom objects should be created in the SnowAutomationPlatformDomain or SnowAutomationPlatformAzman databases. Instead if customised data has to be stored for use with AP, create a new database e.g. - SnowAutomationPlatformCustomerData.
The above has been identified in-part due to a fruitful partnership between a customer, partner and vendor - I therefore encourage you all to adopt a pro-active approach ensuring maximum learnings and understanding between all stakeholders, this is particularly important where customisation is required.
Regards,
/F

Benefits of Microsoft SCCM Connector
What are the benefits of using the Microsoft SCCM Connector for Snow if the Snow agent is already on the computers in SCCM?


Viktors asked a question.
