This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ADGroup -Filter {(name -like "*admins*") -or (name -like "*administrator*")} ` | |
| Get-ADGroupMember -Recursive | Where { $_.objectClass -eq "user" } ` | |
| Get-ADUser -properties * | where {$_.enabled -eq $true} ` | |
| where {$_.lockedout -eq $false} | select SamAccountName -unique |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub exportComments() | |
' Forked from https://gist.github.com/razorgoto/cff2ffd5da93220c643c, updated to work with Library 16.0. | |
' This also fixes a bug where it crashed if there was a comment on the very first header. | |
' Exports comments from a MS Word document to Excel and associates them with the heading paragraphs | |
' they are included in. Useful for outline numbered section, i.e. 3.2.1.5.... | |
' Thanks to Graham Mayor, http://answers.microsoft.com/en-us/office/forum/office_2007-customize/export-word-review-comments-in-excel/54818c46-b7d2-416c-a4e3-3131ab68809c | |
' and Wade Tai, http://msdn.microsoft.com/en-us/library/aa140225(v=office.10).aspx | |
' Need to set a VBA reference to "Microsoft Excel 16.0 Object Library". 14.0 works too. | |
' Go to the Tools Menu, and click "Reference" |