Giter Site home page Giter Site logo

evotecit / pswindocumentation Goto Github PK

View Code? Open in Web Editor NEW
242.0 29.0 38.0 1014 KB

PowerShell Module that creates Word/Excel/SQL documentation from Active Directory (AD), AWS, Office 365 and others. It's a work in progress!

License: MIT License

PowerShell 100.00%
powershell hacktoberfest

pswindocumentation's Introduction

PSWinDocumentation - PowerShell Module

Overview of this module is available at: https://evotec.xyz/hub/scripts/pswindocumentation-powershell-module/

This module utilizes three projects of mine

  • PSWriteWord - creating Microsoft Word without Word installed from PowerShell
  • PSWriteExcel - creating Microsoft Excel without Excel installed from PowerShell
  • PSSharedGoods - bunch of useful functions that I share among all of my projects

All 3 modules above are under active development.

For additional functionality it utilizes

  • AWSPowershell - allows connecting to AWS and creating AWS dataset
  • ActiveDirectory RSAT - allows connecting to AD and creating Active Directory dataset
  • DBATools - allows connecting to SQL and sending data to SQL (create table, alter table, inserts)
  • DSInternals - required for Password Audit in Active Directory

You have to install those modules yourself. I don't bundle them but it's as easy as typing Install-Module <YourModule>. While I could bundle them and maybe some day I will but for now it's too heavy as this module can be installed on AD servers directly - so I don't want you to overload your DC's - even if it's just PowerShell Module.

Goals

Ultimate goal of this project is to have proper documentation of following services:

  • Active Directory
  • AWS
  • Microsoft Exchange (mostly Excel / SQL export oriented)
  • Office 365 Exchange Online (mostly Excel / SQL export oriented)
  • Office 365 Azure AD (mostly Excel / SQL export oriented)
  • Office 365 Teams (not started)
  • Office 365 Skype for Business (not started)
  • Office 365 Intune (not started)
  • Office 365 SharePoint (not started)
  • Windows Server (some basic stuff - not functionable)
  • Windows Workstation (some basic stuff - not functionable)

I'm heavily open for feature requests and people willing to create data sets. By data sets I mean data prepared to be included in report (usually HashTable, OrderedHashTable, Array or PSCustomobject). This module is smart enough that it can easily convert that data into Word Sections. Also don't really pay attention to percentage numbers. If you have request I will consier adding it.

Updates

  • 0.5.4 / Unreleased

    • Added Invoke-Documentation for oneliner fun
  • 0.5.3 / 2020.06.22

    • Updated modules to newest versions
  • 0.5.0 / 2019.06.23

    • Updated with support for PSWriteWord 1.0.0
    • Updated with support for PSSharedGoods 0.0.79
    • Updated with support for PSWriteExcel 0.7.2
  • 0.3.x / 2018.10.08 - full blog post

    • Added audit your Active Directory Passwords
    • Expanded Active Directory data types (computer based)
    • Expanded Active Directory data types (fine grained policies)
    • Couple of fixes here and there
  • 0.2.x / 2018.09.23 - full blog post

    • Allows Exporting to Microsoft SQL (that's right – export data directly to SQL – complete with create table, alter table and inserts)
    • Basic data set AWS
    • Advanced data set Active Directory
    • Basic data set Microsoft Exchange
    • Basic data set Office 365 – Exchange Online
    • Basic data set Office 365 – Azure AD
    • Prescanning of data headers for exports (unravel hidden data)
    • Ability to define TableColumnWidths in sections
  • 0.1 / 2018.08.23

  • 0.0.5 / 2018.07.30

    • fix for DefaultPassWordPolicy MinPasswordLength (was reporting wrong value)
  • 0.0.4 / 2018.07.30

    • added domain controllers section
    • added few verbose messages with -Verbose switch for easier debugging
    • commented out some unused code for now (to speed up work)
  • 0.0.3 / 2018.07.29

    • first "good" release

Progress on Documentation

Active Directory

Following is very incomplete list of things that are done or are planned in near future. I really need to update that.

  • Forest Summary
  • Forest FSMO Roles
  • Forest Optional Features (Recycle Bin, PAM)
  • Forest UPN List
  • Forest SPN List
  • Domain Summary
  • Domain Controllers
    • Basic information
    • Basic hardware information
  • Domain FSMO Roles
  • Domain Password Policies
  • Domain Group Policies
  • Domain Organizational Units
    • Requires work. Currently a bit useless
  • Domain Privileged Members (Groups)
  • Domain Administrators (All users)
  • Domain User Count
    • Users Count Incl. System
    • Users Count
    • Users Expired
    • Users Expired Incl. Disabled
    • Users Never Expiring
    • Users Never Expiring Incl. Disabled
    • Users System Accounts
  • Domain User List (deciding if needed)
    • Users Count Incl. System
    • Users Count
    • Users Expired
    • Users Expired Incl. Disabled
    • Users Never Expiring
    • Users Never Expiring Incl. Disabled
    • Users System Accounts

Active Directory Data Sources - to use with new version

public enum ActiveDirectory {
    // Forest Information - Section Main
    ForestInformation,
    ForestFSMO,
    ForestGlobalCatalogs,
    ForestOptionalFeatures,
    ForestUPNSuffixes,
    ForestSPNSuffixes,
    ForestSites,
    ForestSites1,
    ForestSites2,
    ForestSubnets,
    ForestSubnets1,
    ForestSubnets2,
    ForestSiteLinks,

    // Domain Information - Section Main

    DomainRootDSE,
    DomainRIDs,
    DomainAuthenticationPolicies, // Not yet tested
    DomainAuthenticationPolicySilos, // Not yet tested
    DomainCentralAccessPolicies, // Not yet tested
    DomainCentralAccessRules, // Not yet tested
    DomainClaimTransformPolicies, // Not yet tested
    DomainClaimTypes, // Not yet tested
    DomainFineGrainedPolicies,
    DomainFineGrainedPoliciesUsers,
    DomainFineGrainedPoliciesUsersExtended,
    DomainGUIDS,
    DomainDNSSRV,
    DomainDNSA,
    DomainInformation,
    DomainControllers,
    DomainFSMO,
    DomainDefaultPasswordPolicy,
    DomainGroupPolicies,
    DomainGroupPoliciesDetails,
    DomainGroupPoliciesACL,
    DomainOrganizationalUnits,
    DomainOrganizationalUnitsBasicACL,
    DomainOrganizationalUnitsExtended,
    DomainContainers,
    DomainTrusts,

    // Domain Information - Group Data
    DomainGroupsFullList, // Contains all data

    DomainGroups,
    DomainGroupsMembers,
    DomainGroupsMembersRecursive,

    DomainGroupsSpecial,
    DomainGroupsSpecialMembers,
    DomainGroupsSpecialMembersRecursive,

    DomainGroupsPriviliged,
    DomainGroupsPriviligedMembers,
    DomainGroupsPriviligedMembersRecursive,

    // Domain Information - User Data
    DomainUsersFullList, // Contains all data
    DomainUsers,
    DomainUsersCount,
    DomainUsersAll,
    DomainUsersSystemAccounts,
    DomainUsersNeverExpiring,
    DomainUsersNeverExpiringInclDisabled,
    DomainUsersExpiredInclDisabled,
    DomainUsersExpiredExclDisabled,
    DomainAdministrators,
    DomainAdministratorsRecursive,
    DomainEnterpriseAdministrators,
    DomainEnterpriseAdministratorsRecursive,

    // Domain Information - Computer Data
    DomainComputersFullList, // Contains all data
    DomainComputersAll,
    DomainComputersAllCount,
    DomainComputers,
    DomainComputersCount,
    DomainServers,
    DomainServersCount,
    DomainComputersUnknown,
    DomainComputersUnknownCount,

    // This requires DSInstall PowerShell Module
    DomainPasswordDataUsers, // Gathers users data and their passwords
    DomainPasswordDataPasswords, // Compares Users Password with File
    DomainPasswordDataPasswordsHashes, // Compares Users Password with File HASH
    DomainPasswordClearTextPassword,
    DomainPasswordLMHash,
    DomainPasswordEmptyPassword,
    DomainPasswordWeakPassword,
    DomainPasswordDefaultComputerPassword,
    DomainPasswordPasswordNotRequired,
    DomainPasswordPasswordNeverExpires,
    DomainPasswordAESKeysMissing,
    DomainPasswordPreAuthNotRequired,
    DomainPasswordDESEncryptionOnly,
    DomainPasswordDelegatableAdmins,
    DomainPasswordDuplicatePasswordGroups,
    DomainPasswordHashesWeakPassword,
    DomainPasswordStats,
}

More suggestions are welcome.

Microsoft Exchange

  • Currently not defined. Feel free to make feature requests

Microsoft Office 365

  • Currently not defined. Feel free to make feature requests

Windows Server doc

  • Currently not defined. Feel free to make feature requests

Windows Workstation doc

  • Currently not defined. Feel free to make feature requests

Statistics

Known Issues

  • PSWinDocumentation #12 If you want to build documentation on your own template you're free to do so, however, you should use Data\EmptyDocument.docx as your starting template. This is because of an issue with PSWriteWord (more specifically with DLL it uses) where Heading styles are not available when using the template created directly in Microsoft Word. The issue was reported PSWriteWord #16 but it's a long time till it will be fixed. Until then simply use Data\EmptyDocument.docx and then add your logos, text, whatever you feel like you need in a template.

pswindocumentation's People

Contributors

ferwe avatar mniemczyk avatar przemyslawklys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pswindocumentation's Issues

Language

I changed settings to
Language = 'de-de' in Run-Documentation.ActiveDirectory.ps1
but when I open the file in MS Word it tells me that I have to install polish error correction.

BPA

Would it be possible to add output of Best Practice Analyzer for AD to the report?

different things

Thanks for the nice presentation at psconf and the great work! I used the module for the first time today with "Run-Documentation.ActiveDirectory.ps1" and I like it. You said suggestions are welcome and I would have a few. :)
If it's OK I would like to summarize them here or should I open multiple issues?

Schema Admins

Please could you add Schema Admins to the AD Report?

Trouble with Get-ADUser

Hey,
got trouble on a Server 2016 DC, getting this Error (changed Domain to X):

AUSFÜHRLICH: Start-ActiveDirectoryDocumentation - Getting Forest Information
AUSFÜHRLICH: Start-ActiveDirectoryDocumentation - Working...1
AUSFÜHRLICH: Start-ActiveDirectoryDocumentation - Working...2
AUSFÜHRLICH: Start-ActiveDirectoryDocumentation - Getting domain information
Get-ADUser : Unter "DC=X,DC=local" kann kein Objekt mit der ID "CN=ServerAdmin,CN=Managed Service Accounts,DC=X,DC=local" gefunden werden.
In C:\Program Files\WindowsPowerShell\Modules\PSWinDocumentation\0.0.5\Private\PSADDomain.ps1:19 Zeichen:187

  • ... DGroupMember -Server $Domain -Recursive | Get-ADUser -Server $Domain)
  •                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (CN=ServerAdmin,...,DC=X,DC=local:ADUser) [Get-ADUser], ADIdentityNotFoundException
    • FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException,Microsoft.ActiveDirectory.Management.Commands.GetADUser

AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-21-1795207983-3442354869-3719958033-512 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-21-1795207983-3442354869-3719958033-518 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-21-1795207983-3442354869-3719958033-519 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-21-1795207983-3442354869-3719958033-520 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-32-544 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-32-548 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-32-549 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-32-550 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-32-551 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-32-552 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-32-556 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-32-557 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-32-573 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-32-578 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Get-PrivilegedGroupsMembers - Group S-1-5-32-580 in X.local (S-1-5-21-1795207983-3442354869-3719958033)
AUSFÜHRLICH: Start-ActiveDirectoryDocumentation - Creating section for X.local - Domain Controllers
AUSFÜHRLICH: Start-ActiveDirectoryDocumentation - Creating section for X.local - FSMO Roles

Unable to find type [ListItemType] (Same as #20)

Don't think I can re-open cdaniel's issue, but in the meanwhile, trying the AD side, I get the same error.

Module versions I'm running
image

Tried including Update-Module PSWriteWord at the top of the ps1, that didn't change anything...

Get-WinO365Exchange issue

Good Evening,

Attempting to run your scripts for an O365 tenant and had to fix several things initially using the examples provided etc. However, stuck here:

`Get-WinO365Exchange : The term 'Get-WinO365Exchange' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At C:\Program Files\WindowsPowerShell\Modules\PSWinDocumentation\0.5.0\PSWinDocumentation.ps1:107 char:55

  • ... 'ExchangeOnline' { $DataInformation = Get-WinO365Exchange -TypesR ...
  •                                           ~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Get-WinO365Exchange:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException`

Any help you can provide?

Split PSWinDocumentation into multiple smaller modules per category

Goal would be to create:

  • PSWinDocumentation - would bundle all modules PSWriteWord, PSWriteExcel, PSSharedGoods, alone with those below
  • PSWinDocumentation.AD - would only be able to play with AD and export to .xml (would need to bundle PSSharedGoods)
  • PSWinDocumentation.Exchange - would only be able to play with Exchange and export to .xml
  • PSWinDocumentation.AWS - would only be able to play with AWS and export to .xml
  • PSWinDocumentation.XXX - ....

This would allow for:

  • Running minimal parts of code where required AD module on DC, Exchange module on Exchange Servers and so on
  • Building Word Documents/Excel documents only on dedicated servers/computers
  • Each module except main one would be platform independent

Alternatively:

  • One module with a command such as Get-WinModuleAD which would copy relevant functions and create one file that could copied over to DC and used without installation.

More information about GPOs

It would be nice to get more information about the GPOs, for example:
Links
Security Filtering
Maybe even Settings, but this might be to much.

Custom Template - Table of Content/Headding failed

I tried to use a custom template for creating the report.

After a few tests the following happened

  1. If I use the internal Template, the Table of Content was created correctly
  2. If I use the internal Template but with the custom template option, it was created correctly as well
    This are the situations which worked

If I use a own template, the headding didn't work. So there are no headding where the Table of Content could relate to.
I tested following situations, which doesn't worked:

  1. I used a own template
  2. I copied the builtin template and put my own stuff in it
  3. I copied the builtin template and removed just the evotec background

I use Word 2016 for creating the template

Issue: Section Skip Broken or Missing Logic

First, love what you've built here, particularly in the latest version with the ability to provide a config file for runtime.

Issue:
You provide the option to bypass sections via $Document, however code still runs unless all related elements are also bypassed.

Runtime Environment:
Windows 10 v1803
PowerShell v5.1
Module Versions - Latest of all dependent modules, pulled directly from GitHub

Expectation:
Setting non-primary items without sub-dependencies as $false for inclusion should result in those portions of the data gathering process to be bypassed unless they are a dependency for another item.

Example:
I set 'SectionDomainOrganizationalUnits' to $true and 'SectionExcelDomainOrganizationalUnitsBasicACL' and 'SectionExcelDomainOrganizationalUnitsExtended' to $false with the expectation that the basic OU information would be collected, but the ACLs would not. Based on what I interpret from the script logic, selecting one will always include all. I can see why you need to get the base org units to support permissions, however there is no reason to require permissions when all I want is a list of org units.

It would be great if:
a) the $documents schema were arranged to more clearly show dependency relationships, possibly by making child dependencies sub-sections within the config (ie SectionDomainOrganizationalUnits for parent and SectionDomainOrganizationalUnits.SubSectionBaseACL and SubSectionExtACL for depedencies)
b) when setting a parent item to $false, but setting a child dependent item to $true, prompt the user to tell them of the dependency and ask if they want to go ahead and collect the required parent, or skip the child item
c) Alternative: code to collect a reduced set of values or data when excluding the parent, but including a child (ie Including SectionExcelDomainUsersNeverExpiring should retrieve only the minimum required attributes rather than always getting all users with all properties, which causes performance problems see other issue)

Not working?

I installed based on the information here:
https://evotec.xyz/hub/scripts/pswindocumentation-powershell-module/

However when I run:
Start-ActiveDirectoryDocumentation -CompanyName 'Evotec' -FilePath $FilePath -OpenDocument
Nothing seems to happen.

Here is what I've done:

  1. Downloaded and Imported PSWriteWord
    Import-Module PSWriteWord

  2. Downloaded and Imported PSWinDocumentation
    Import-Module PSWinDocumentation

  3. Downloaded and Installed Windows RSAT tools

  4. Installed the two modules from 1. and 2.

Install-Module PSWriteWord -Force
Install-Module PSWinDocumentation -Force

Did I miss a step somewhere? Thanks!

When Running the 0.3.x Script return error

This occurs when executing the script found at the bottom of https://evotec.xyz/pswindocumentation-audit-active-directory-passwords/

I have thrown a couple powershell errors when running in verbose mode.
Domain Trust infomration and Domain Group Members

VERBOSE: Getting domain information - domain.local DomainTrusts
Set-TrustAttributes : Cannot process argument transformation on parameter 'Value'. Cannot convert the
"System.Object[]" value of type "System.Object[]" to type "System.Int32".
At C:\Program Files\WindowsPowerShell\Modules\PSWinDocumentation\0.3.0\Public\Get-WinADDomainInformation.ps1:194
char:79
+ ... ibutes'           = Set-TrustAttributes -Value $Trust.TrustAttributes
+                                                    ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Set-TrustAttributes], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Set-TrustAttributes



VERBOSE: Getting domain information - domain.local DomainGroupsMembersRecursive
Get-ADGroupMember : An unspecified error has occurred
At C:\Program Files\WindowsPowerShell\Modules\PSWinDocumentation\0.3.0\Private\Get-WinGroupMembers.ps1:12 char:32
+ ... embership = Get-ADGroupMember -Server $Domain -Identity $Group.'Group ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (S-1-5-21-406467...354198304-11353:ADGroup) [Get-ADGroupMember], ADExcepti
   on
    + FullyQualifiedErrorId : ActiveDirectoryServer:0,Microsoft.ActiveDirectory.Management.Commands.GetADGroupMember****

Computers

all the computers in the report have an ending $ (I know its ithe internal name of the ad object) but for a report the visible name without $ would be better.

the report only tells the major windows version but there are alteady 11 versions of Windows then. it would be great if the version would be shown, the AD has this in attribut operatingSystemVersion

Error: Unable to find type [DocX]

Happy to admit, first time trying your files, getting a puzzling error.

image

Tried the standard built in template, tried the empty doc from your downloads and tried a fresh docx (blank and saved). Tried changing to dotx in case it was the wrong format. Tried on two Win10 laptops, 1903 with Office 2016 and 1909 with Office 365. Exact same behaviour (both PS 5.1), every time its unable to find type.

image

image

Digitally Sign Module

Dear Przemyslaw

This module, unlike most others you made, are not digitally signed.
Could you consider to sign this module to allow running in environments with "AllSigned" execution policy?

Thank you very much.
Best regards
Patrick

Unable to find type [Container].

Hey, sorry, got busy with regular work. Your response time is seriously impressive!
Dived into this again.
First updated modules PSWinDocumentation (still 0.5.1), PSSharedGoods (now 0.0.107), PSWriteWord (now 1.1)
Then used script here to remove old versions: http://sharepointjack.com/2017/powershell-script-to-remove-duplicate-old-modules/
Updated ADEssentials.psd1 on line 54 to require 0.0.107

Script runs until it hits an error:
image

Guessing that line (haven't modified the script since first setting up) - param([Container] $WordDocument,- is referring to the doc variable, so the start of your script:
image

And the folder in question
image

After the errors this in powershell
image

And the ReportO365 docx opens, blank.

Unable to find type [ListItemType]

It occurs when I try to run the script for Office 365 creating the following object

image

Unable to find type [ListItemType].
At C:\Users\cdani\OneDrive\Área de Trabalho\report.ps1:58 char:35
+                 TocListItemType = [ListItemType]::Numbered
+                                   ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (ListItemType:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound

In the following lines you can find the script I used:

Import-Module PSWinDocumentation
Import-Module PSWinDocumentation.O365
$Document = [ordered]@{
    Configuration     = [ordered] @{
        Prettify       = @{
            CompanyName        = 'Evotec'
            UseBuiltinTemplate = $true
            CustomTemplatePath = ''
            Language           = 'en-US'
        }
[...]
            SectionO365Introduction                 = [ordered] @{
                ### Enables section
                Use             = $true;
                ### Decides how TOC should be visible
                TocEnable       = $True
                TocText         = 'Scope'
                TocListLevel    = 0
                **TocListItemType = [ListItemType]::Numbered**
                TocHeadingType  = [HeadingType]::Heading1
                ### Text is added before table/list
                Text            = ""
                TextAlignment   = [Alignment]::Both
                PageBreaksAfter = 1
            }
[...]

Script was extracted from https://evotec.xyz/hub/scripts/pswindocumentation-powershell-module/ and after running it changing the parameters, the error occurs.

[Xceed.Words.NET.DocX] not found

Hi,
i have a following problem when i run the script.
imported all modules, but dont know what im doing wrong.

WARNUNG: New-WordDocument - Document: C:\Users\usernameDesktop\PSWinDocumentation-ADReportWithPasswords.docx
 Error: Der Typ [Xceed.Words.NET.DocX] not found

Thanks for your work :)

ParameterBindingArgumentTransformationException when running PSWriteExcel

At the part of the script when it begins to write to an Excel portion I get this error:
Save-WordDocument : Cannot process argument transformation on parameter 'WordDocument'. Cannot convert the

"System.Object[]" value of type "System.Object[]" to type "Xceed.Words.NET.Container".

At C:\Program Files\WindowsPowerShell\Modules\PSWinDocumentation\0.1.0\Public\PSAD.ps1:49 char:53

  • $FilePath = Save-WordDocument -WordDocument $WordDocument `

  • 
    
  • CategoryInfo : InvalidData: (:) [Save-WordDocument], ParameterBindingArgumentTransformationException

  • FullyQualifiedErrorId : ParameterArgumentTransformationError,Save-WordDocument

Issue is with PSWriteExcel version 0.0.10

The problem goes away when I run PSWinDocumentation script without Export to Excel enabled and also if I uninstall the PSWriteExcel module and reinstall version 0.0.3

Error while executing

C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSWinDocumentation\Examples\Run-Documentation.ActiveDirectory.ps1
Unable to find type [PSWinDocumentation.ActiveDirectory].
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PSWinDocumentation\Examples\Run-Documentation.ActiveDirectory.ps1:90 char:39
+ ...        TableData       = [PSWinDocumentation.ActiveDirectory]::Forest ...
+                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (PSWinDocumentation.ActiveDirectory:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound

Import-Module PSWinDocumentation -Force

Import-Module PSWinDocumentation -Force
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSWinDocumentation\PSWinDocumentation.psm1 : Failed to import function
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSWinDocumentation\Private\Script.Document.ps1: Unable to find type [PSWinDocumentation.ActiveDirectory].
At line:5 char:1

  • Import-Module PSWinDocumentation -Force
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,PSWinDocumentation.psm1
    
    

Error Encountered

Running this in verbose

VERBOSE: Start-ActiveDirectoryDocumentation - Getting domain information
Get-GPO : The term 'Get-GPO' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\marshph-adm\Documents\WindowsPowerShell\Modules\pswindocumentation\0.0.5\Private\PSADDomain.ps1:26 char:35

  • $ADSnapshot.GroupPolicies = $(Get-GPO -Domain $Domain -All)
    
  •                               ~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Get-GPO:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Basic Authentication

Great work! For ExchangeOnline and other work, the connection is basic auth in Examples. Does this support modern authentication methods?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.