Schlagwörter » System Center

secRMM extends SCCM PowerShell Library

October 24, 2016 – secRMM has increased its PowerShell support.  There is a new secRMM PowerShell cmdlet to give you the same property granularity that is available from the secRMM Excel AddIn (as shown in the screen shot below). 289 weitere Wörter


SQL 2016 Grant Perform Volume Maintenance Task aka instant file initialization

Did I forget to check that box?

Instant File Initialization (IFI) has been around dating back to SQL 2005 and the requests to easily allow us to check this feature during Setup reach way back as well. 389 weitere Wörter

Microsoft SQL Server 2016

5 Quick Gripes

  1. I still can’t batch delete Management Packs from SCOM 2016 without using PowerShell.
  2. $stringvalue.trim() and then, ::round($somenumbr,2)
  3. Best place to ask a tech question to get the fastest AND most reliable answer: Reddit?
  4. 67 weitere Wörter

PowerShell: Export-CmReports.ps1

Another I glued together today for a lab project.  No error trapping, weeeee!

 Export-CmReports exports SCCM SQL RSP reports to RDL files in
 a specified location

 3-character site code

 NetBios hostname of SCCM RSP host

.PARAMETER ReportFolder
 Name of logical SSRS report folder, or "ALL" to export all folders
 Default is "/" which is not recursive

.PARAMETER OutputFolder
 Path location where RDL files will be exported
 Default is $USERPROFILE\Documents

 Written by: David Stein
 Date Create: 10/19/2016

 Export-CmReports -SiteCode "ABC" -HostName "CM1"
 Export-CmReports -SiteCode "ABC" -HostName "CM1" -ReportFolder "My Custom Reports" -OutputFolder "C:\Temp"
 Export-CmReports -SiteCode "ABC" -HostName "CM1" -ReportFolder "ALL" -OutputFolder "C:\Temp"

function Export-CmReports {
  param (
      $ReportFolder = "/",
      $OutputFolder = "$($env:USERPROFILE)\Documents"
  $url = "http://$HostName/ReportServer/ReportService2010.asmx?WSDL"
  Write-Host "connecting to SSRS web service..." -ForegroundColor Cyan
  $ssrs = New-WebServiceProxy -Uri $url -UseDefaultCredential -Namespace "ReportingWebService"
  if ($ReportFolder -eq "ALL") {
    $folders = $ssrs.ListChildren("/ConfigMgr_$SiteCode", $False) | ?{$_.TypeName -eq 'Folder'}
  else {
    $folders = $ssrs.ListChildren("/ConfigMgr_$SiteCode", $False) | ?{$_.Name -eq "$ReportFolder"}

  if ($folders.Length -gt 0) {
    foreach ($folder in $folders) {
      $fname = $folder.Name
      $fpath = $folder.Path
      $reports = $ssrs.ListChildren("$fPath" , $False)
      if ($reports.Length -gt 0) {
        Write-Host "Folder: $fName : $($reports.Length) reports" -ForegroundColor Cyan
        $OutPath = "$OutputFolder\$fName"

        if (!(Test-Path $OutPath)) {
          md $OutPath -Force
        foreach ($r in $reports) {
          $reportName = $r.Name 
          if ($r.Hidden -eq $True) {
            Write-Host "skipping hidden report: $reportName" -ForegroundColor Gray
          else {
            Write-Host "reading: $reportName..." -ForegroundColor Green
            $def = $ssrs.GetItemDefinition($r.Path)
            $stream = ::OpenWrite("$OutPath\$reportName.rdl")
            $stream.Write($def, 0, $def.Length)
            Write-Host "exported: $reportName successfully!" -ForegroundColor Green
      else {
        Write-Host "no reports were found" -ForegroundColor Cyan
    } # foreach
  Write-Host "done!"
} 20 weitere Wörter

How to move SCVMM VMs into a Cloud

If you’ve ever added hosts to an SCVMM instance you’ll know that there’s seeminly no easy way to move the newly imported VMs from those hosts into SCVMM clouds. 143 weitere Wörter

Windows Server