Skype for Business Environment Report

This package of PowerShell scripts will gather data on a Skype for Business environment and store it into an XML data file. You can also create Microsoft Word reports and Microsoft Visio network diagrams based on the data gathered.

 
 
 
 
 
5 Star
(5)
1,275 times
Add to favorites
Lync
12/7/2016
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Add-ShapeToPage Visio Error
    5 Posts | Last post Tue 10:58 PM
    • Hi There
      
      I get the following error:
      
      Add-ShapeToPage : 
      An exception occurred.
      At C:\Users\BMarks\Documents\Skype for Business\Cs Env Report v6.0\New-CsEnvDiagram.ps1:637 char:21
      + ... ntOutline = Add-ShapeToPage -Shape "Rectangle" -Page $CurrentPage -X1 ...
      +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : OperationStopped: (:) [Add-ShapeToPage], COMException
          + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Add-ShapeToPage
      
      I have read through the posts and there doesnt seem to be an fix, or I just dont know how to fix it.
      
      Please help. :-)
    • Ok, somehow I got this to run and it started creating the visio diagram. But near the end of the Diagram when it was adding the internal servers, it stopped and gave me the follow error. Any ideas?
      
      New-VisioSitePage : Method invocation failed because [System.Management.Automation.PSObject] does not contain a method named 'op_Addition'.
      At C:\Users\BMarks\Documents\Skype for Business\Cs Env Report v6.0\New-CsEnvDiagram.ps1:621 char:3
      +         New-VisioSitePage -Site $Site -CurrentPage $CurrentPage
      +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidOperation: (op_Addition:String) [New-VisioSitePage], RuntimeException
          + FullyQualifiedErrorId : MethodNotFound,New-VisioSitePage
    • Hello Skellitor, what did you fix to get this error to go away ?
      
      637 char:21
      Thanks
    • Hi Alexander
      
      I must be honest, i dont really know. I think it had to do with how I ran the script. My second issue has got to do with errors I get when gathering info from SQL cluster but i think it has to do with user rights. 
      
      Regards
    • Hi Alexander and Skellitor
      
      how i fix this error.
      
      thanks
      
      RI
  • Error while generating visio
    4 Posts | Last post January 19, 2018
    • Modified the script by according to your suggestion, the error changes to below
      
      Extracting CS Environment data file to R:\
      Importing CS Environment data file.
      Creating diagram: .\CS_Env_Data-0117180106.vsdx
      Creating new instance of Visio to work with.
      Creating new Visio document.
      Adding page(s) to Visio document.
      Importing stencils...
      New-VisioDiagram :
      File not found.
      At R:\New-CsEnvDiagram.ps1:1170 char:1
      + New-VisioDiagram -DataFileName $script:XmlFileName -CsConfig $CsConfi ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : OperationStopped: (:) [New-VisioDiagram], COMException
          + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,New-VisioDiagram
      
      Do I have to download any stencil or other requirement is needed before running this script? Thanks a lot
    • I've short out the error above, but got another during drawing the diagram
      
      New-VisioSitePage : Exception getting "Item": "
      Object name not found."
      At C:\Users\kenfil\Desktop\Cs Env Report v6.0\New-CsEnvDiagram.ps1:621 char:3
      +         New-VisioSitePage -Site $Site -CurrentPage $CurrentPage
      +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [New-VisioSitePage], GetValueI
         nvocationException
          + FullyQualifiedErrorId : ExceptionWhenGetting,New-VisioSitePage
      
      Looking forward for your advise, billion thanks
    • Hi
      
      How did you solve the first error? I've tried changing it as to what RAGuth earlier wrote but it didn't help.
      
      Thanks
      
      Broddi
    • The first issue I've hit is the incorrect paper size, just do a search "papersize" and replace 3 with 2 or 8
      This next error which what posted previously, just download and extract the stencil and place all vss to my documents\my stencils
      
      Both Visio 2013/2016 getting same error....
  • Unable to query remote machine servername.domain.com for ____ details
    1 Posts | Last post January 02, 2018
    • Hello,
      
      I've come across your script in the hopes that it can help me with an environment that I'm trying to decipher.  When running the script, I see nothing but yellow warnings that point to the subject of this question "Unable to query remote machine servername.domain.com for ____ details".  The account used in the collection of data is a member of the CsAdministrator and the RTCUniversalServerAdmins group.  I'm running the Get-CsEnvironmentInfo script on a Front End server.  
      
      Thanks,
      
      Chris
  • Unable to draw in Visio (2016)
    1 Posts | Last post November 28, 2017
    • Running New-CSEnvDiagram results in the following, can generate the XML / zip no issues..
      
      New-VisioDiagram : 
      File not found.
      At D:\Skype for Business Environment Report\New-CsEnvDiagram.ps1:1169 char:1
      + New-VisioDiagram -DataFileName $script:XmlFileName -CsConfig $CsConfi ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : OperationStopped: (:) [New-VisioDiagram], COMException
          + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,New-VisioDiagram
  • Error While Creating Visio Diagram
    1 Posts | Last post September 28, 2017
    • Hi , 
      
      I am getting the following error message , can you please share the updated script so that we can test that one , i have read all the Q/A and i am not expert in Powershell , you havent mentioned where to change the script the new suggested changes. 
      
      Error As follows. 
      
      PS C:\Users\bilal.ali\Downloads\Cs Env Report v6.0> .\New-CsEnvDiagram.ps1 -EnvDataFile '.\target.com CS_Env_Data-092717
      0430.xml'
      Starting report creation.
      Importing CS Environment data file.
      Creating diagram: .\target.com CS_Env_Data-0927170430.vsdx
      Creating new instance of Visio to work with.
      Creating new Visio document.
      Adding page(s) to Visio document.
      Importing stencils...
      New-VisioDiagram :
      File not found.
      At C:\Users\bilal.ali\Downloads\Cs Env Report v6.0\New-CsEnvDiagram.ps1:1169 char:1
      + New-VisioDiagram -DataFileName $script:XmlFileName -CsConfig $CsConfi ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : OperationStopped: (:) [New-VisioDiagram], COMException
          + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,New-VisioDiagram
      
      Looking forward.
      
      Regards
      Bilal 
  • Error when creating Visio
    3 Posts | Last post September 21, 2017
    • Hi,
      
      I tried to create the Visio with New-CsEnvDiagram.ps1 but received the following error:
      Add-ShapeToPage :
      An exception occurred.
      At line:587 char:21
      + … ntOutline = Add-ShapeToPage -Shape “Rectangle” -Page $CurrentPage -X1 …
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : OperationStopped: (:) [Add-ShapeToPage], COMException
      + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Add-ShapeToPage
      
      Can I do something from my side to fix this?
      
      Thank you!
    • Hello Simon,
      Did you find a answer to this error ? I am having the same issue.
      
      Thanks
    • Same Problem here, any solutions?
  • Visio Script finishing error
    1 Posts | Last post September 20, 2017
    • When completed there are three lines at the end of the function that call Update-Status and the script stops.  This function doesn't exist.  Change these lines to Update-Log and the script will complete normally.
  • I'm getting this error
    2 Posts | Last post September 20, 2017
    • .\New-CsEnvDiagram.ps1 -EnvDataFile SFB2016_new.zip
      Starting report creation.
      Extracting CS Environment data file to C:
      Importing CS Environment data file.
      Creating diagram: SFB2016_new.vsdx
      Creating new instance of Visio to work with.
      Creating new Visio document.
      Adding page(s) to Visio document.
      Importing stencils...
      New-VisioDiagram :
      This file name is not valid.
      New-CsEnvDiagram.ps1:1169 char:1
      + New-VisioDiagram -DataFileName $script:XmlFileName -CsConfig $CsConfi ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : OperationStopped: (:) [New-VisioDiagram], COMException
          + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,New-VisioDiagram
      
      
    • See my post above and modify the script so that a page is added before the script tries to access it.
  • $NetInterfaces always contains 0.0.0.0 in Report
    1 Posts | Last post September 20, 2017
    • It appears the collection does not complete this structure correctly. While the XML for the machine correctly references the object, the object only contains
      <Obj N="NetInterfaces" RefId="2262">
      <TNRef RefId="11" />
      <LST>
      <S>Microsoft.Rtc.Management.Deploy.Internal.Machine+NetInterface</S>
      <S>Microsoft.Rtc.Management.Deploy.Internal.Machine+NetInterface</S>
      <S>Microsoft.Rtc.Management.Deploy.Internal.Machine+NetInterface</S>
      </LST>
      </Obj>
      
      Which results in the Report script variable $NetInterfaces having this value all the time.
      Primary 1 0.0.0.0
      External 1 0.0.0.0
      PSTN 1 0.0.0.0
      
      Also, FYI - the report script has an error when adding the IP Address(es) to the data table.  You have
      if($NetInterfaces {[void]$dt.Rows.Add("IP Address(es)",$NetInterfaces)
      which results in System.Object being put in the table.
      
      I changed this to 
      if ($NetInterfaces) { 
        $IPs = $NetInterfaces | Output-String
        [void]$dt.Rows.Add("IP Address(es)",$IPs.Trim)
      }
      
      So now you get the object formatted for the text field (as if you had just output the object at the command line).
      
  • Exception when creating site pages after first - Resolved
    1 Posts | Last post September 19, 2017
    • The error occurs because the function New-VisioDiagram tries to set $CurrentPage to a non-existent page (and tries to define layers on it).
      
      To fix this, look in the function and find this line
      for($CurrentSiteNumber = 1; $CurrentSiteNumber -le $CsConfig.Topology.Object.Sites.Count; $CurrentSiteNumber++ ){
      
      Scroll down and look for this set of lines
      # Make sure there are enough pages for each site.
      if ($VisioPages.Count -lt $CurrentSiteNumber){$CurrentPage = $VisioPages.Add()}
      
      Cut these lines and insert them right after the "for" loop you found earlier and just before the comment "Select page for current site."
      
      This makes sure that a new page is added to the Visio diagram and sets $CurrentPage to this new one.  
      
1 - 10 of 22 Items