
RicardoPereira asked a question.

RicardoPereira asked a question.


JYARBROUGH asked a question.
I would like to find a way to add computers to SCCM Collections based on the installation information found in SLM. We have a script that transfer collection information from one machine to another but were finding the collection information is not always populated. In short if a install of a product is found the Workflow would utilize the collection information populated in the Store data of SLM to then place the computer in that collection. Creating the SCCM Powershell is pretty simple but I'm struggling with collecting the data from SLM. Is there any way to use the API to provide what software is installed on a computer? I should be able to then take that data and query the API to capture the collection information of the application.
Thanks
Jerry


mwickel asked a question.
Hi,
I would like to extend our default SLM AutomationBook workflow with a "run extra activity based on compliance info"
1. software request by user via Snow AP
2. SLM AP Workflows
2.1 Wait for organizational approval (default workflow step)
2.2 Organizational approval (default workflow step)
- shows the approver the current compliance status
2.3 If compliance status is negativ, run procurement workflow
- procurement workflow is done, back to 2.2 and wait for final approval by organisation
2.4 install application
I want to add an intermediate step, if the compliance status is negative, then the approver should be able to start a procurement workflow. When the procurement workflow is complete, the approval workflow should go one.
I would be pleased about suggestions for the implementation of my requirement.
Thank and Best
Mathias


JYARBROUGH asked a question.
The Powershell below works great when I run it straight from Powershell and prompt for the inputs. However when I run inside of the App Store I get the following error.
Failed to run expression: . 'C:\Program Files\Snow Software\Snow Automation Platform\Activities\migrategroupmembership\2\migrategroupmembership.ps1' -identity 'CNCLCFZLHC2' -target 'STLVDBUS029'. Row number: 110. Error: Cannot validate argument on parameter 'MemberOf'. The argument is or empty. Provide an argument that is not or empty, and then try the command again.
It appears to be passing the parameter but from some reason the MemborOf is but I don't get that error when I run manually.
Thanks for you help!
Jerry
Param(
$identity,
$target
)
Function Get-MyModule
{
Param([string]$name)
if(-not(Get-Module -name $name))
{
if(Get-Module -ListAvailable |
Where-Object { $_.name -eq $name })
{
Import-Module -Name $name
$true
} #end if module available then import
else { $false } #module not available
} # end if not module
else { $true } #module already loaded
} #end function get-MyModule
Function Get-GroupsToMigrate
{
Param($identity)
$array = @()
$groups = Get-AdComputer -Identity $identity -property “MemberOf”
Foreach($group in $groups.memberOf)
{
#$reply = Read-Host -Prompt “add group $($group) `r`ny / n”
#if($reply -match “y”) {$array +=$group}
} #end foreach
Return $array
} #end Get-GroupsToMigrate
# *** ENTRY POINT TO SCRIPT ***
If(-not (Get-MyModule -name “ActiveDirectory”)) { exit }
$array = Get-GroupsToMigrate -identity $identity
Get-ADComputer -Identity $target | Add-ADPrincipalGroupMembership -MemberOf $array
#testing making a change
