RICT Consultant https://rictconsultant.nl ICT Dienstverlening op maat Wed, 26 Nov 2025 09:07:54 +0000 nl-NL hourly 1 https://wordpress.org/?v=6.9.4 https://rictconsultant.nl/wp-content/uploads/2025/11/cropped-logo-32x32.png RICT Consultant https://rictconsultant.nl 32 32 Powershell script hashwaarde Intune SCCM Script https://rictconsultant.nl/uncategorized/powershell-script-hashwaarde-intune-sccm-script/ https://rictconsultant.nl/uncategorized/powershell-script-hashwaarde-intune-sccm-script/#respond Wed, 26 Nov 2025 09:07:54 +0000 https://rictconsultant.nl/?p=675 Hieronder vindt u een PowerShell-script dat de hardware-hash van het systeem uitleest en deze automatisch wegschrijft naar een gedeelde netwerkmap. Op deze manier kan de hash eenvoudig worden geïmporteerd in Microsoft Intune.

Daarnaast genereert het script een tekstbestand op dezelfde share, waarin de betreffende apparaatnamen worden vastgelegd. Dit bestand kan worden gebruikt om systemen vanuit MECM aan specifieke collecties toe te voegen.

Tot slot wordt er een registersleutel aangemaakt om te voorkomen dat dezelfde machine opnieuw wordt toegevoegd.




# UNC-share en bestandsnamen
$OutputFolder           = "\\Share\Intune_Hash$"         
$OutputFileName         = "Autopilot-Hashes.csv"
$ComputerListFileName   = "Autopilot-ComputerNames.txt"

# Group Tag die in Intune wordt gebruikt
$GroupTag       = "CMLP"                                     

# Logging (lokaal op de client)
$EnableLogging  = $true
$LogFile        = "C:\Temp\AutopilotHash_RunScript.log"

# Registry-marker zodat we niet dubbel schrijven per machine
$MarkerKeyPath  = "HKLM:\SOFTWARE\RICT\Autopilot"
$MarkerKeyName  = "HashExported"

# Retry-instellingen voor schrijven naar bestanden
$MaxWriteRetries        = 10       # aantal pogingen
$WriteRetryDelaySeconds = 3        # wachttijd tussen pogingen (seconden)

#endregion =================== CONFIGURATIE ======================


#region ====================== HULPFUNCTIES ======================

function Write-Log {
    param([string]$Message)

    if (-not $EnableLogging) { return }

    try {
        $timestamp = (Get-Date).ToString("yyyy-MM-dd HH:mm:ss")
        $line = "$timestamp`t$Message"
        Add-Content -Path $LogFile -Value $line -ErrorAction SilentlyContinue
    } catch {
        # Logging mag nooit iets laten falen
    }
}

function Get-LocalAutopilotInfo {
    <#
        Haalt de Autopilot-info van de lokale machine op:
        - Device Serial Number
        - Windows Product ID (leeg, niet vereist)
        - Hardware Hash
        - Group Tag (optioneel)
    #>
    param([string]$GroupTag = "")

    $session = $null

    try {
        Write-Log "Get-LocalAutopilotInfo: start."

        # CIM-session naar localhost
        $session = New-CimSession

        # Serienummer uit BIOS
        $bios   = Get-CimInstance -CimSession $session -ClassName Win32_BIOS
        $serial = $bios.SerialNumber

        # Autopilot hardware hash via MDM bridge
        $devDetail = Get-CimInstance -CimSession $session `
            -Namespace "root/cimv2/mdm/dmmap" `
            -ClassName "MDM_DevDetail_Ext01" `
            -Filter "InstanceID='Ext' AND ParentID='./DevDetail'"

        if ($null -eq $devDetail) {
            Write-Log "Get-LocalAutopilotInfo: MDM_DevDetail_Ext01 niet gevonden, hash niet beschikbaar."
            $hash = ""
        } else {
            $hash = $devDetail.DeviceHardwareData
        }

        # Windows Product ID (PKID) is niet verplicht voor Intune; laten we leeg
        $product = ""

        $props = @{
            "Device Serial Number" = $serial
            "Windows Product ID"   = $product
            "Hardware Hash"        = $hash
        }

        if ($GroupTag) {
            $props["Group Tag"] = $GroupTag
        }

        $obj = New-Object psobject -Property $props

        Write-Log "Get-LocalAutopilotInfo: serial=$serial, hashLengte=$($hash.Length)."
        return $obj
    }
    catch {
        Write-Log "Get-LocalAutopilotInfo: FOUT: $($_.Exception.Message)"
        throw
    }
    finally {
        if ($session) {
            Remove-CimSession -CimSession $session -ErrorAction SilentlyContinue
        }
    }
}

function Add-CsvLineWithRetry {
    <#
        Schrijft header (indien nodig) + één CSV-regel met retry-logica
    #>
    param(
        [string]$Path,
        [string]$Header,
        [string]$Line,
        [int]   $MaxRetries,
        [int]   $DelaySeconds
    )

    for ($attempt = 1; $attempt -le $MaxRetries; $attempt++) {
        try {
            $needHeader = $true

            if (Test-Path -Path $Path) {
                $fileInfo = Get-Item -Path $Path -ErrorAction SilentlyContinue
                if ($fileInfo -and $fileInfo.Length -gt 0) {
                    $needHeader = $false
                }
            }

            if ($needHeader) {
                Write-Log "Schrijfpoging $attempt CSV: bestand ontbreekt of is leeg, schrijf header + regel."
                $Header | Out-File -FilePath $Path -Encoding ASCII
                $Line   | Out-File -FilePath $Path -Encoding ASCII -Append
            } else {
                Write-Log "Schrijfpoging $attempt CSV: append alleen nieuwe regel."
                $Line | Out-File -FilePath $Path -Encoding ASCII -Append
            }

            Write-Log "Schrijfpoging $attempt CSV: succesvol."
            return
        }
        catch {
            $msg = $_.Exception.Message
            Write-Log "Schrijfpoging $attempt CSV mislukt: $msg"

            if ($attempt -lt $MaxRetries) {
                Write-Log "Wacht $DelaySeconds seconde(n) en probeer CSV opnieuw..."
                Start-Sleep -Seconds $DelaySeconds
            } else {
                Write-Log "Maximale aantal CSV-schrijfpogingen ($MaxRetries) bereikt."
                throw
            }
        }
    }
}

function Add-TextLineWithRetry {
    <#
        Schrijft een enkele tekstregel met retry-logica (geen header)
        Gebruikt voor de computerlijst-file.
    #>
    param(
        [string]$Path,
        [string]$Line,
        [int]   $MaxRetries,
        [int]   $DelaySeconds
    )

    for ($attempt = 1; $attempt -le $MaxRetries; $attempt++) {
        try {
            $Line | Out-File -FilePath $Path -Encoding ASCII -Append
            Write-Log "Schrijfpoging $attempt computerlijst: succesvol."
            return
        }
        catch {
            $msg = $_.Exception.Message
            Write-Log "Schrijfpoging $attempt computerlijst mislukt: $msg"

            if ($attempt -lt $MaxRetries) {
                Write-Log "Wacht $DelaySeconds seconde(n) en probeer computerlijst opnieuw..."
                Start-Sleep -Seconds $DelaySeconds
            } else {
                Write-Log "Maximale aantal schrijfpogingen computerlijst ($MaxRetries) bereikt."
                throw
            }
        }
    }
}

#endregion =================== HULPFUNCTIES ======================


#region ====================== HOOFDLOGICA =======================

Write-Log "========== Start Autopilot hash export (Run Script) =========="

# 1. Check registry-marker: als al gedaan, stop
try {
    $marker = Get-ItemProperty -Path $MarkerKeyPath -Name $MarkerKeyName -ErrorAction Stop
    if ($marker.$MarkerKeyName -eq 1) {
        Write-Log "Marker gevonden, hash eerder al geëxporteerd. Script stopt."
        Write-Output "INFO: Autopilot-hash was eerder al geëxporteerd voor deze machine. Geen wijzigingen."
        exit 0
    }
} catch {
    Write-Log "Marker bestaat nog niet, ga door."
}

# 2. Zorg dat outputfolder bestaat
try {
    if (-not (Test-Path -Path $OutputFolder)) {
        Write-Log "Outputfolder [$OutputFolder] bestaat niet, probeer aan te maken."
        New-Item -ItemType Directory -Path $OutputFolder -Force | Out-Null
        Write-Log "Outputfolder aangemaakt."
    } else {
        Write-Log "Outputfolder [$OutputFolder] bestaat al."
    }
} catch {
    $msg = "FOUT: kon outputfolder [$OutputFolder] niet gebruiken: $($_.Exception.Message)"
    Write-Log $msg
    Write-Output $msg
    exit 1
}

# 3. Bepaal paden
$OutputFile       = Join-Path -Path $OutputFolder -ChildPath $OutputFileName
$ComputerListFile = Join-Path -Path $OutputFolder -ChildPath $ComputerListFileName

Write-Log "Output CSV : $OutputFile"
Write-Log "Computerlijst: $ComputerListFile"

# 4. Haal Autopilot-info op van lokale machine
$device = $null
try {
    $device = Get-LocalAutopilotInfo -GroupTag $GroupTag
} catch {
    $msg = "FOUT: ophalen van Autopilot-info is mislukt: $($_.Exception.Message)"
    Write-Log $msg
    Write-Output $msg
    exit 1
}

if (-not $device) {
    $msg = "FOUT: Get-LocalAutopilotInfo gaf niets terug."
    Write-Log $msg
    Write-Output $msg
    exit 1
}

if ([string]::IsNullOrWhiteSpace($device."Hardware Hash")) {
    $msg = "FOUT: Hardware Hash is leeg. Mogelijk MDM bridge niet beschikbaar of geen Autopilot-hash."
    Write-Log $msg
    Write-Output $msg
    exit 1
}

# 5. Kolomvolgorde & header
$selectProps = @("Device Serial Number", "Windows Product ID", "Hardware Hash")
if ($GroupTag) {
    $selectProps += "Group Tag"
}
$header = ($selectProps -join ",")

# 6. CSV-regel maken (zonder quotes)
$newCsvLine = ($device | Select-Object -Property $selectProps | ConvertTo-Csv -NoTypeInformation)[1]
$newCsvLine = $newCsvLine -replace '"',''

# 7. CSV schrijven met retry
try {
    Add-CsvLineWithRetry -Path $OutputFile `
                         -Header $header `
                         -Line $newCsvLine `
                         -MaxRetries $MaxWriteRetries `
                         -DelaySeconds $WriteRetryDelaySeconds
} catch {
    $msg = "FOUT: kon CSV niet wegschrijven na meerdere pogingen: $($_.Exception.Message)"
    Write-Log $msg
    Write-Output $msg
    exit 1
}

# 8. Computernaam-regel bouwen en schrijven met retry (alleen hostname)
$serialOut = $device."Device Serial Number"
$compName  = $env:COMPUTERNAME
$computerLine = $compName

try {
    Add-TextLineWithRetry -Path $ComputerListFile `
                          -Line $computerLine `
                          -MaxRetries $MaxWriteRetries `
                          -DelaySeconds $WriteRetryDelaySeconds
} catch {
    $msg = "LET OP: kon computernaam niet wegschrijven na meerdere pogingen: $($_.Exception.Message)"
    Write-Log $msg
    Write-Output $msg
    # hash staat al in CSV, dus we laten script als 'succes' eindigen
}

# 9. Registry-marker zetten
try {
    if (-not (Test-Path -Path $MarkerKeyPath)) {
        New-Item -Path $MarkerKeyPath -Force | Out-Null
    }

    New-ItemProperty -Path $MarkerKeyPath -Name $MarkerKeyName -Value 1 -PropertyType DWord -Force | Out-Null
    Write-Log "Marker key gezet: $MarkerKeyPath\$MarkerKeyName = 1"
} catch {
    $msg = "LET OP: kon marker key niet zetten: $($_.Exception.Message)"
    Write-Log $msg
    Write-Output $msg
    # geen exit 1: hash en naam zijn al weggeschreven
}

Write-Log "Autopilot-hash succesvol verwerkt voor serial: $serialOut (computer: $compName)"
Write-Log "========== Einde Autopilot hash export (Run Script) =========="

Write-Output "OK: Autopilot-hash geëxporteerd voor serial $serialOut (computer $compName) naar $OutputFile. Computerlijst bijgewerkt: $ComputerListFile"
exit 0


]]>
https://rictconsultant.nl/uncategorized/powershell-script-hashwaarde-intune-sccm-script/feed/ 0
CMPivot gebruiken voor uitlezen ComputerHash https://rictconsultant.nl/uncategorized/cmpivot-gebruiken-voor-uitlezen-hash-waarde/ https://rictconsultant.nl/uncategorized/cmpivot-gebruiken-voor-uitlezen-hash-waarde/#respond Fri, 21 Nov 2025 08:03:29 +0000 https://rictconsultant.nl/?p=656 Bios | project Device, SerialNumber | join (MDMDevDetail | project Device, DeviceHardwareData) | project SerialNumber, WindowsProductID = '', HardwareHash = DeviceHardwareData, GroupTag = 'TAG-AANPASSEN'

Hierna de eerste regel aanpassen met spaties “Device Serial Number,Windows Product ID,Hardware Hash,Group Tag” (niet nodig als je onderstaande script uitvoerd bij meer dan 500 machines)

LET op de ‘ bij het kopieren.

Outputfile van max 480 genereren:

# Pad naar de input CSV
$InputCsv = "C:\Temp\Raoef\AutopilotImport.csv"

# Map waar de output CSV’s komen
$OutputFolder = "C:\Temp\Raoef\OutputSplit"

# Max aantal DATA-regels per bestand (excl. header)
$MaxDataRows = 480


# Nieuw gewenste header
$CustomHeader = "Device Serial Number,Windows Product ID,Hardware Hash,Group Tag"

# Outputmap aanmaken als deze nog niet bestaat
if (!(Test-Path $OutputFolder)) {
    New-Item -ItemType Directory -Path $OutputFolder | Out-Null
}

# Hele bestand als tekstregels inlezen
$lines = Get-Content -Path $InputCsv

if ($lines.Count -lt 2) {
    Write-Host "Bestand bevat geen of alleen een header, niets te splitsen."
    return
}

# Data begint vanaf lijn 2
$data = $lines[1..($lines.Count - 1)]

$fileIndex = 1

for ($i = 0; $i -lt $data.Count; $i += $MaxDataRows) {

    $start = $i
    $end   = [Math]::Min($i + $MaxDataRows - 1, $data.Count - 1)

    # Huidige blok data-regels
    $chunk = $data[$start..$end]

    # Output-bestand
    $outputFile = Join-Path $OutputFolder ("split_{0}.csv" -f $fileIndex)

    # Eerst de custom header schrijven
    $CustomHeader | Out-File -FilePath $outputFile -Encoding UTF8

    # Daarna de data-regels toevoegen
    $chunk | Add-Content -Path $outputFile -Encoding UTF8

    Write-Host "Aangemaakt: $outputFile (regels $($start+2) t/m $($end+2))"

    $fileIndex++
}
]]>
https://rictconsultant.nl/uncategorized/cmpivot-gebruiken-voor-uitlezen-hash-waarde/feed/ 0
IT-Consultancy https://rictconsultant.nl/uncategorized/it-consultancy/ https://rictconsultant.nl/uncategorized/it-consultancy/#respond Thu, 13 Nov 2025 13:45:50 +0000 https://rictconsultant.nl/?p=564
IT Consultancy

Specialistisch IT-advies & begeleiding voor uw organisatie

Van strategie tot uitvoering – onafhankelijk advies, helder in begrijpelijke taal.

Bij RICT-Consultant ondersteunen wij organisaties bij het ontwerpen, verbeteren en beveiligen van hun IT-omgeving. Met ruim 15 jaar ervaring in complexe infrastructuren, cloudoplossingen en moderne werkplekken bieden wij zowel strategisch advies als praktische, hands-on ondersteuning.

Wat houdt IT Consultancy in?

IT Consultancy betekent dat wij met u meedenken over de volledige IT-keten: van strategie en beveiliging tot beheer, cloud en werkplek. Wij vertalen complexe vraagstukken naar concrete, uitvoerbare oplossingen die passen bij uw organisatie, processen en budget.

  • IT-strategie, roadmap en toekomstbestendige architectuur
  • Beveiliging, compliance en risicobeheersing
  • Cloud- en infrastructuurkeuzes (on-premises, hybride, cloud)
  • Optimalisatie, automatisering en efficiënter beheer
  • Gebruikerservaring, continuïteit en stabiliteit van de omgeving

Diensten binnen onze IT Consultancy

Cloud & Microsoft 365 / Azure

Advies en begeleiding bij migraties naar de cloud, het inrichten van Azure-omgevingen en het optimaal inzetten van Microsoft 365. Wij kijken naar beveiliging, kostenbeheersing en integratie met uw bestaande systemen.

  • Cloudstrategie en migratieplanning
  • Azure-inrichting en governance
  • Veilige samenwerking binnen Microsoft 365
  • Hybride scenario’s (on-premises & cloud)

Moderne Werkplek & Device Management

Een veilige, goed beheerde werkplek voor al uw gebruikers, op basis van Windows 10/11 en moderne beheertooling zoals Intune, Autopilot en Endpoint Management.

  • Inrichting en hardening van Windows 10/11
  • Intune, Autopilot en endpointbeheer
  • Update- en patchbeleid op maat
  • Compliance en lifecycle-beheer van devices

IT-Infrastructuur, Security & Projectbegeleiding

Van Active Directory tot netwerksegmentatie en beveiligingsmaatregelen: wij beoordelen uw huidige IT-omgeving, adviseren verbeteringen en begeleiden implementaties of migraties.

  • Server- en netwerkarchitectuur, virtualisatie en AD
  • Securityadvies (Zero Trust, Identity, endpoints)
  • Begeleiding van migraties en moderniseringstrajecten
  • Onafhankelijke second-opinion op oplossingen en leveranciers

Waarom kiezen voor RICT-Consultant?

Een ervaren IT Consultant die strategie en praktijk samenbrengt – van whiteboard tot implementatie.

✔
Ruim 15 jaar hands-on ervaring in complexe IT-omgevingen.
✔
Diepgaande kennis van Microsoft, cloud, security en infrastructuur.
✔
Zowel adviserend als uitvoerend inzetbaar, afhankelijk van uw behoefte.
✔
Heldere communicatie, transparante afspraken en geen onverwachte kosten.
✔
Flexibele inzet: losse opdrachten, trajecten of werken met een strippenkaart.

Geschikt voor overheidsorganisaties, bedrijven, IT-afdelingen en teams die extra expertise of capaciteit nodig hebben.

Liever eerst sparren over uw situatie? Neem contact op voor een kort, vrijblijvend gesprek. Samen brengen we de huidige IT-omgeving en verbeterkansen helder in beeld.

Telefoon: 06 420 54 106
E-mail: info@rictconsultant.nl

Vrijblijvend kennismakingsgesprek

Tijdens een kennismakingsgesprek bespreken we uw organisatie, huidige IT-omgeving en doelen. U krijgt een eerlijke inschatting van wat mogelijk is, welke stappen nodig zijn en hoe wij daarbij kunnen helpen.

Op basis daarvan kunt u zelf kiezen: een eenmalig advies, een project, of doorlopende ondersteuning.

]]>
https://rictconsultant.nl/uncategorized/it-consultancy/feed/ 0
https://rictconsultant.nl/uncategorized/456/ https://rictconsultant.nl/uncategorized/456/#respond Thu, 13 Nov 2025 07:39:52 +0000 https://rictconsultant.nl/?p=456
Zoek op onze website

]]>
https://rictconsultant.nl/uncategorized/456/feed/ 0
https://rictconsultant.nl/uncategorized/340/ https://rictconsultant.nl/uncategorized/340/#respond Wed, 12 Nov 2025 12:04:53 +0000 https://rictconsultant.nl/?p=340

Uw IT-strippenkaart – betaal alleen voor wat u gebruikt

Met de RICT-Consultant strippenkaart koopt u vooraf uren in en zet u onze expertise in wanneer het ú uitkomt.

Bij RICT-Consultant geloven we in een toekomstgerichte IT-omgeving die meegroeit met uw bedrijf. Met de IT-strippenkaart kiest u voor flexibiliteit en transparantie: professionele IT-ondersteuning voor o.a. netwerkbeheer, beveiliging, cloud, optimalisaties en support – zonder langdurige contracten.

  • Uren vrij inzetbaar gedurende 12 maanden
  • Voorspelbare kosten, geen verrassingen
  • Directe hulp van ervaren IT-specialisten

2 uur

Instap | Ad-hoc support

€ 215
incl. 0% korting • 12 mnd geldig
Bestel strippenkaart

5 uur

Regulier | Klein project

€ 525
ca. 2% korting • 12 mnd geldig
Bestel strippenkaart
Meest gekozen

10 uur

Projecten | Regelmatige ondersteuning

€ 1.025
ca. 5% korting • 12 mnd geldig
Bestel strippenkaart

20 uur

Intensiever | Roadmap & implementatie

€ 1.950
ca. 9% korting • 12 mnd geldig
Bestel strippenkaart

40 uur

Voorraad uren | Voordeligste tarief

€ 3.750
ca. 13% korting • 12 mnd geldig
Bestel strippenkaart

Prijzen excl. btw. Uren zijn overdraagbaar binnen dezelfde rechtspersoon. Reactietijden in overleg afhankelijk van pakket.

]]>
https://rictconsultant.nl/uncategorized/340/feed/ 0
https://rictconsultant.nl/uncategorized/professionele-it-consultancy-op-strippenkaartbasis/ https://rictconsultant.nl/uncategorized/professionele-it-consultancy-op-strippenkaartbasis/#respond Wed, 12 Nov 2025 12:00:05 +0000 https://rictconsultant.nl/?p=329

]]>
https://rictconsultant.nl/uncategorized/professionele-it-consultancy-op-strippenkaartbasis/feed/ 0
SCCM Delivery Optimalization Settings Powershell script https://rictconsultant.nl/uncategorized/sccm-delivery-optimalization-settings-powershell-script/ https://rictconsultant.nl/uncategorized/sccm-delivery-optimalization-settings-powershell-script/#respond Thu, 11 Jul 2024 10:08:42 +0000 https://rictconsultant.nl/?p=301

net stop ccmexec
net stop wuauserv
net stop AppIDSvc
net stop cryptSvc
net stop bits

Remove-Item -path “C:\Windows\System32\GroupPolicy\Machine\Registry.pol”
Remove-Item -path “C:\Windows\System32\GroupPolicy\User\Registry.pol”
Remove-Item -path “C:\Windows\System32\GroupPolicy\gpt.ini”

Delete-DeliveryOptimizationCache -Force

Remove-Item -Path “registry::HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Jobs\Persisted\Jobs” -Force -Recurse
Remove-Item -Path “registry::HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Jobs\Persisted\Persisted” -Force -Recurse
Remove-Item -Path “registry::HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Jobs\Persisted\Source” -Force -Recurse

Get-ChildItem -path “C:\ProgramData\Microsoft\Network\Downloader*.jrs” | Rename-Item -NewName { $_.Name -replace ‘.jrs’,’.jrsOLD’ }
Get-ChildItem -path “C:\ProgramData\Microsoft\Network\Downloader*.jfm” | Rename-Item -NewName { $_.Name -replace ‘.jfm’,’.jfmOLD’ }
Get-ChildItem -path “C:\ProgramData\Microsoft\Network\Downloader*.db” | Rename-Item -NewName { $_.Name -replace ‘.db’,’.dbOLD’ }

Rename-Item C:\Windows\SoftwareDistribution SoftwareDistribution.old
Rename-Item C:\Windows\System32\catroot2 Catroot2.old

net start wuauserv
net start cryptSvc
net start bits
net start msiserver
net start ccmexec

gpupdate /force
WMIC /Namespace:\root\ccm path SMS_Client CALL ResetPolicy 1 /NOINTERACTIVE
WMIC /namespace:\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000040}” /NOINTERACTIVE
WMIC /namespace:\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000107}” /NOINTERACTIVE
WMIC /namespace:\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000108}” /NOINTERACTIVE

Rmdir C:\Windows\SoftwareDistribution.old -force -recurse
Rmdir C:\Windows\System32\Catroot2.old -force -recurse

]]>
https://rictconsultant.nl/uncategorized/sccm-delivery-optimalization-settings-powershell-script/feed/ 0
SCCM Configuration Manager Client Scan Trigger with WMI https://rictconsultant.nl/uncategorized/sccm/ https://rictconsultant.nl/uncategorized/sccm/#respond Thu, 11 Jul 2024 10:03:50 +0000 https://rictconsultant.nl/?p=298 You can also trigger agent from WMI command line if you don’t want to open the configuration manager properties.

Client AgentWMI Command
Application Deployment Evaluation CycleWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000121}” /NOINTERACTIVE
Discovery Data Collection CycleWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000003}” /NOINTERACTIVE
File Collection CycleWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000010}” /NOINTERACTIVE
Hardware Inventory CycleWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000001}” /NOINTERACTIVE
Machine Policy Retrieval CycleWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000021}” /NOINTERACTIVE
Machine Policy Evaluation CycleWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000022}” /NOINTERACTIVE
Software Inventory CycleWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000002}” /NOINTERACTIVE
Software Metering Usage Report CycleWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000031}” /NOINTERACTIVE
Software Updates Assignments Evaluation CycleWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000108}” /NOINTERACTIVE
Software Update Scan CycleWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000113}” /NOINTERACTIVE
State Message RefreshWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000111}” /NOINTERACTIVE
User Policy Retrieval CycleWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000026}” /NOINTERACTIVE
User Policy Evaluation CycleWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000027}” /NOINTERACTIVE
Windows Installers Source List Update CycleWMIC /namespace:\\root\ccm path sms_client CALL TriggerSchedule “{00000000-0000-0000-0000-000000000032}” /NOINTERACTIVE
]]>
https://rictconsultant.nl/uncategorized/sccm/feed/ 0
SCCM Configuration Manager Client Scan Trigger with Powershell https://rictconsultant.nl/uncategorized/configuration-manager-client-scan-trigger-with-powershell/ https://rictconsultant.nl/uncategorized/configuration-manager-client-scan-trigger-with-powershell/#respond Thu, 11 Jul 2024 10:00:08 +0000 https://rictconsultant.nl/?p=293 Powershell can also be used to launch scans on clients whether local or remote. Simply use the command Invoke-WMIMethod:

$Server = Server Name where you want to run the trigger. You can remove -ComputerName if you are locally on the server.

Client AgentPowershell Command
Application Deployment Evaluation CycleInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000121}”
Discovery Data Collection CycleInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000003}”
File Collection CycleInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000010}”
Hardware Inventory CycleInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000001}”
Machine Policy Retrieval CycleInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000021}”
Machine Policy Evaluation CycleInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000022}”
Software Inventory CycleInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000002}”
Software Metering Usage Report CycleInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000031}”
Software Update Deployment Evaluation CycleInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000114}”
Software Update Scan CycleInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000113}”
State Message RefreshInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000111}”
User Policy Retrieval CycleInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000026}”
User Policy Evaluation CycleInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000027}”
Windows Installers Source List Update CycleInvoke-WMIMethod -ComputerName $Server -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule “{00000000-0000-0000-0000-000000000032}”
]]>
https://rictconsultant.nl/uncategorized/configuration-manager-client-scan-trigger-with-powershell/feed/ 0
Powershell Script voor het uitlezen van de Hardwarehash https://rictconsultant.nl/uncategorized/powershell-script-voor-het-uitlezen-van-de-hardwarehash/ https://rictconsultant.nl/uncategorized/powershell-script-voor-het-uitlezen-van-de-hardwarehash/#respond Mon, 21 Feb 2022 13:53:13 +0000 https://rictconsultant.nl/?p=230 New-Item -Type Directory -Path "C:\RICTDemo" Set-Location C:\RICTDemo Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned Install-Script -Name Get-WindowsAutopilotInfo -Force $env:Path += ";C:\Program Files\WindowsPowerShell\Scripts" Get-WindowsAutopilotInfo -OutputFile Autopilot.csv ]]> https://rictconsultant.nl/uncategorized/powershell-script-voor-het-uitlezen-van-de-hardwarehash/feed/ 0