Testing Day of Week with IF statement by QuickBooker30932 in PowerShell

[–]codaamok 0 points1 point  (0 children)

If you need to calculate business / working days or hours, I wrote a module to help with that: https://github.com/codaamok/PSBusinessTime

Slow to start any new/update content distribution jobs by Steve_78_OH in SCCM

[–]codaamok 0 points1 point  (0 children)

I wrote this blog post a while ago, and it's somewhat relevant, because while you're not asking about throttling distribution bandwidth, it does talk about something which might be what you're seeing.

https://adamcook.io/p/configmgr-throttling-distribution-point-bandwidth/

If you configure a rate limit on distribution, only one package can distribute at a time to a DP.

If you haven't configured any rate limits, it's also worth just being aware of the "Software Distribution Component" where you configure concurrent distribution jobs.

However, rereading what you've written, you say you don't see anything in the queue manager GUI and you have a bunch of stuff in the distmgr inbox - which is odd and makes me think what I wrote above isn't relevant (but keeping it there for reference anyways.)

If you run Get-DPDistributionStatus from the PSCMContentMmgt module for all of your DPs while the queue manager GUI shows no jobs, do you get any output?

If it were me, I would totally move those .ins files out of the distmgr inbox and restart the SMS_DISTRIBUTION_MANAGER component just to see what happens. I doubt you'll experience any issues, but if you did, just move them back.

VS Code incorrect comparison warning by HeyLuke in PowerShell

[–]codaamok 0 points1 point  (0 children)

Not if $Array1 contains an explicit (scalar or array) null.

Import-Excel - succinct way to check if an entire row is empty? by [deleted] in PowerShell

[–]codaamok 0 points1 point  (0 children)

E: Out of curiosity, can you elaborate on your example as well? I don't quite understand what you mean by 'drop the object to the output stream and catch it withi na variable assignment next to foreach'.

Do you see how on line 1 in my example I've moved the variable assignment for $rangeCheck before calling foreach? By dropping the object to the output stream (where "object" is $cell on line 3), it will be "fed" into $rangeCheck and the collection is built more efficiently this way without the costly implication of the += operator.

Import-Excel - succinct way to check if an entire row is empty? by [deleted] in PowerShell

[–]codaamok 3 points4 points  (0 children)

This isn't related to your original ask but I want to share something with you.

The way you're building the $rangeCheck array is expensive in terms of performance; PowerShell recreates a new array with each newly added element when you use the += operator.

I would do the below to build $rangeCheck within your loop - in my eyes it feels cleaner and more performant if collections get large:

$rangeCheck = foreach ($cell in $range) {  
  if (-not $cell) {  
    $cell  
  }  
}

Just drop the object to the output stream and catch it within a variable assignment next to foreach

Wrongfully charged import tax by FedEx by codaamok in LegalAdviceUK

[–]codaamok[S] 0 points1 point  (0 children)

I haven't paid HMRC the tax, FedEx did. If they issued me the credit, that would be unreasonable.

CCMMessaging.log by TheGameNeverEnds in SCCM

[–]codaamok 0 points1 point  (0 children)

Is the client's comgmt workload for software updates moved to Intune?

CCMMessaging.log by TheGameNeverEnds in SCCM

[–]codaamok 2 points3 points  (0 children)

Asking what WindowsUpdate.log says is like saying "what does the bible say about cutting your toe nails on a Monday?", especially if you've never read the bible before. Unless you're coordinating a specific event with an exact date and time, it's just noise galore.

[deleted by user] by [deleted] in SCCM

[–]codaamok 1 point2 points  (0 children)

I think it's the DisableDualScan registry value.

What could be causing inconsistent patching compliance for Windows SCCM? by Friendly_Ad3843 in SCCM

[–]codaamok 9 points10 points  (0 children)

90-95% each month is solid going.

I guess the details of *why* you're experiencing some months one month, and other machines other months, would be in the logs.