Forum Discussion
Mohita18
Apr 17, 2020Copper Contributor
Powershell for SCCM
I am new to Powershell and I want to run a powershell to query to SCCM Deployement status. 1)If appenforcement state is 1000 or 1001 for multple application names then the powershell output should b...
Animesh Joshi
Apr 21, 2020Brass Contributor
so what happens when you run this script?
the syntax looks OK with the exception of what's populating $Computer that you pass to query string s1.netbios_name0 =$Computer "
I can't see an IF query inside forEach($AppName in $AppNames) loop unless you're referring to the IF inside for($i=0;$i -lt $dataTable.Rows.Count;$i++) which has no logic for a $counter variable.
the syntax looks OK with the exception of what's populating $Computer that you pass to query string s1.netbios_name0 =$Computer "
I can't see an IF query inside forEach($AppName in $AppNames) loop unless you're referring to the IF inside for($i=0;$i -lt $dataTable.Rows.Count;$i++) which has no logic for a $counter variable.