none
Powershell Hard data collecting for later SCCM Usage RRS feed

  • Question

  • Hello Everyone,

    I got a pretty hard task with automating patching through SCCM, but this requires some hard powershell skills which I lack.

    The SCCM part should be in my skill range, but the data collecting and working on it...can be hard, heres why:

    I need to make this fully automatic if possible, when I receive a csv/xlsx file that has each week different values in the tables, I would like the script to group it for me in such way:

    File always has the same headers, file has 8-9 of them, but the only that interest me look like this:

    Hostname  Maintenance window  Date
    s1            15-22           06.06.19
    s2            15-22           06.06.19
    s3            00-03           07.07.19
    s4            03-05           08.08.19

    What I am looking for is to create variables on which I will base next variables to create SCCM collections/Maintenance windows/deployments and so on, so something like below

    "$Maintenance window 15-22" would consist of "s1" and "s2" as they are  both from the same same time range + the same Day, then to get next variable, consting of "s3" next of "s4" and so on
    ...I just need something that would create me variables grouping the hostnames in them, giving me possibility to extract each Maintenance Window for each of them, by Date column...does this make sense? 

    Not sure if this is possible but running PS to collect Date values, create as much Variables as we got days in Date column, and drop there hostnames with Maintenance window column date corresponding to them...

    Is this obtainable? 


    • Moved by jrv Thursday, June 6, 2019 9:46 PM correct forum
    Thursday, June 6, 2019 5:06 PM

All replies