├── Active Directory ├── ActiveDirectory.flexasset └── ActiveDirectory.ps1 ├── DHCP ├── DHCP.flexasset └── DHCP.ps1 ├── File Shares ├── FileShares.flexasset └── FileShares.ps1 ├── README.md └── Supported Applications ├── Applications.flexasset ├── FindApps.ps1 └── applications.xml /Active Directory/ActiveDirectory.flexasset: -------------------------------------------------------------------------------- 1 | Name: Forest Name 2 | Kind: Text 3 | Hint: Full forest name - e.g. domain.com 4 | Checkboxes: Required, Show in List 5 | 6 | Name: Domain Full Name 7 | Kind: Text 8 | Hint: Full Active Directory domain name - e.g. corp.domain.com 9 | Checkboxes: Required, Show in list, Use for title 10 | 11 | Name: Domain Short Name 12 | Kind: Text 13 | Hint: Short Active Directory domain name - e.g. CORP 14 | Checkboxes: Required, Show in list, Use for title 15 | 16 | Name: AD Level 17 | Kind: Select 18 | Hint: Domain Functional Level 19 | Options: 2000, 2003, 2008, 2012 20 | Checkboxes: Required, Show in list 21 | 22 | Name: Schema Master 23 | Kind: Tag 24 | Type: Configurations 25 | Checkboxes: Required, Show in list 26 | 27 | Name: Domain Naming Master 28 | Kind: Tag 29 | Type: Configurations 30 | Checkboxes: Required, Show in list 31 | 32 | Name: Relative ID (RID) Master 33 | Kind: Tag 34 | Type: Configurations 35 | Checkboxes: Required, Show in list 36 | 37 | Name: PDC Emulator Master 38 | Kind: Tag 39 | Type: Configurations 40 | Checkboxes: Required, Show in list 41 | 42 | Name: Infrastructure Master 43 | Kind: Tag 44 | Type: Configurations 45 | Checkboxes: Required, Show in list 46 | 47 | Name: Global Catalog Servers (Domain Controllers) 48 | Kind: Tag 49 | Type: Configurations 50 | Checkboxes: Required, Show in list 51 | -------------------------------------------------------------------------------- /Active Directory/ActiveDirectory.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | 3 | .SYNOPSIS 4 | This script grabs all domains in the current forest along with servers hosting all FSMO roles for each domain 5 | 6 | .DESCRIPTION 7 | Options: 8 | 9 | -help - Display the current help menu 10 | -silent - Run the script without printing anything 11 | -FQDN - Show Fully Qualified Domain Name (server.domain.tld) instead of hostname 12 | -url - Give a URL to POST script output to 13 | -file - Declare a location to save script output to as a csv 14 | 15 | .EXAMPLE 16 | ./ADScraper.ps1 -s -c -url api.example.com 17 | ./ADScraper.ps1 -FQDN -file C:\adout.csv 18 | 19 | .NOTES 20 | Author: Caleb Albers 21 | 22 | .LINK 23 | https://github.com/KeystoneIT/Documentation-Scripts 24 | 25 | #> 26 | 27 | 28 | Param ( 29 | [switch]$help = $False, 30 | [switch]$silent = $False, 31 | [switch]$FQDN = $False, 32 | [switch]$continuum = $False, 33 | [string]$url, 34 | [string]$file, 35 | [string]$organization = "" 36 | ) 37 | 38 | import-module ActiveDirectory 39 | 40 | # Print results 41 | function writeOutput { 42 | Write-Host "Organization Name... `t" -ForegroundColor Gray -NoNewline 43 | Write-Host "`t `t" $organization "`n" 44 | 45 | Write-Host "Forest Name... `t `t" -ForegroundColor Gray -NoNewline 46 | Write-Host "`t `t" $ADForestName "`n" 47 | 48 | Write-Host "Getting AD Functional Level..." -ForegroundColor Gray -NoNewline 49 | Write-Host "`t" $ADFunctionalLevel "`n" 50 | 51 | Write-Host "Getting AD Full Name... " -ForegroundColor Green -NoNewline 52 | Write-Host "`t `t" $Domain "`n" 53 | 54 | Write-Host "Getting AD Short Name... `t" -ForegroundColor Green -NoNewline 55 | Write-Host "`t" $ADShortName "`n" 56 | 57 | Write-Host "Getting FSMO Roles..." -ForegroundColor Green 58 | 59 | Write-Host "`t Schema Master: `t " -ForegroundColor Yellow -NoNewline 60 | Write-Host $SchemaMaster 61 | 62 | Write-Host "`t Domain Naming Master: `t " -ForegroundColor Yellow -NoNewline 63 | Write-Host $DomainNamingMaster 64 | 65 | Write-Host "`t Relative ID (RID) Master: " -ForegroundColor Yellow -NoNewline 66 | Write-Host $RIDMaster 67 | 68 | Write-Host "`t PDC Emulator: `t " -ForegroundColor Yellow -NoNewline 69 | Write-Host $PDCEmulator 70 | 71 | Write-Host "`t Infrastructure Master: `t " -ForegroundColor Yellow -NoNewline 72 | Write-Host $InfrastructureMaster "`n" 73 | 74 | Write-Host "Getting Global Catalog Servers (Domain Controllers)..." -ForegroundColor Green 75 | $GlobalCatalogs 76 | } 77 | 78 | if($help) { 79 | Get-Help $MyInvocation.MyCommand.Path 80 | exit 81 | } 82 | 83 | if(($silent) -and !($url -or $file -or $ftp)) { 84 | Write-Error -Message "ERROR: Using the silent flag requires a URL, FTP server, or location to save results to." ` 85 | -Category InvalidOperation ` 86 | } 87 | else { 88 | if($continuum) { 89 | $organization = (Get-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\SAAZOD").SITENAME 90 | } 91 | 92 | # Get forest info 93 | if($FQDN) { 94 | $ADForestName = (Get-ADForest).Name 95 | $SchemaMaster = (Get-ADForest).SchemaMaster 96 | $DomainNamingMaster = (Get-ADForest).DomainNamingMaster 97 | } 98 | else { 99 | $ADForestName = ((Get-ADForest).Name).split(".")[0] 100 | $SchemaMaster = ((Get-ADForest).SchemaMaster).split(".")[0] 101 | $DomainNamingMaster = ((Get-ADForest).DomainNamingMaster).split(".")[0] 102 | } 103 | $FullFunctionalLevel = (Get-ADForest).ForestMode 104 | switch($FullFunctionalLevel) { 105 | Windows2000Forest {$ADFunctionalLevel = "2000"} 106 | Windows2003Forest {$ADFunctionalLevel = "2003"} 107 | Windows2008Forest {$ADFunctionalLevel = "2008"} 108 | Windows2008R2Forest {$ADFunctionalLevel = "2008 R2"} 109 | Windows2012Forest {$ADFunctionalLevel = "2012"} 110 | Windows2012R2Forest {$ADFunctionalLevel = "2012 R2"} 111 | } 112 | 113 | # Get Global Catalog Servers (Domain Controllers) 114 | if($FQDN) { 115 | $GlobalCatalogs = (Get-ADForest).GlobalCatalogs -join ',' 116 | } 117 | else { 118 | $GlobalCatalogList = @((Get-ADForest).GlobalCatalogs) 119 | $GlobalCatalogs = "" 120 | for($i = 0; $i -lt ($GlobalCatalogList).Count; $i++) { 121 | $GlobalCatalogs += (($GlobalCatalogList[$i]).split(".")[0]) 122 | if(($i+1) -ne $GlobalCatalogList.Count) { $GlobalCatalogs += ","} 123 | } 124 | } 125 | 126 | # Get domain info 127 | $Domains = (Get-ADForest).domains 128 | foreach($Domain in $Domains) { 129 | $ADShortName = (Get-ADDomain -identity $Domain).Name 130 | 131 | # Get FSMO Roles 132 | if($FQDN) { 133 | $RIDMaster = (Get-ADDomain -identity $Domain).RIDMaster 134 | $PDCEmulator = (Get-ADDOmain -identity $Domain).PDCEmulator 135 | $InfrastructureMaster = (Get-ADDomain -identity $Domain).InfrastructureMaster 136 | } 137 | else { 138 | $RIDMaster = ((Get-ADDomain -identity $Domain).RIDMaster).split(".")[0] 139 | $PDCEmulator = ((Get-ADDOmain -identity $Domain).PDCEmulator).split(".")[0] 140 | $InfrastructureMaster = ((Get-ADDomain -identity $Domain).InfrastructureMaster).split(".")[0] 141 | } 142 | 143 | if(!$silent){writeOutput} 144 | if($url -or $file -or $ftp) { 145 | $PostData= @{organization = $organization; ` 146 | ForestName =$ADForestName; ` 147 | FunctionalLevel = $ADFunctionalLevel; ` 148 | DomainName= $Domain; ` 149 | DomainShortName= $ADShortName; ` 150 | SchemaMaster= $SchemaMaster; ` 151 | DomainNamingMaster = $DomainNamingMaster; ` 152 | RIDMaster = $RIDMaster; ` 153 | PDCEmulator = $PDCEmulator; ` 154 | InfrastructureMaster = $InfrastructureMaster; ` 155 | GlobalCatalogServers = "$GlobalCatalogs"; 156 | } 157 | } 158 | if($url){ 159 | Invoke-WebRequest -Uri $url -Method POST -Body $PostData 160 | } 161 | if($file) { 162 | $SaveData += New-Object PSObject -Property $PostData 163 | } 164 | 165 | } 166 | if($file){ 167 | $SaveData | export-csv -Path $file -NoTypeInformation 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /DHCP/DHCP.flexasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Keystone-Technologies/Documentation-Scripts/1077b73de025b28c425a8013d49a72c125d5f9b8/DHCP/DHCP.flexasset -------------------------------------------------------------------------------- /DHCP/DHCP.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | 3 | .SYNOPSIS 4 | This script grabs all DHCP servers in a domain and provides their name, status, and scope 5 | 6 | .DESCRIPTION 7 | Options: 8 | 9 | -help - Display the current help menu 10 | -silent - Run the script without printing anything 11 | -file - Declare a location to save script output to as a csv 12 | -organization - Declare the name of the organization 13 | 14 | 15 | .EXAMPLE 16 | ./DHCP.ps1 -s -c -url api.example.com 17 | ./DHCP.ps1 -FQDN -file C:\adout.csv 18 | 19 | .NOTES 20 | Author: Mark Jacobs 21 | Author: Caleb Albers 22 | 23 | .LINK 24 | https://github.com/KeystoneIT/Documentation-Scripts 25 | 26 | #> 27 | 28 | 29 | Param ( 30 | [switch]$help = $False, 31 | [switch]$silent = $False, 32 | [switch]$continuum = $False, 33 | [string]$url, 34 | [string]$file, 35 | [string]$organization = "" 36 | ) 37 | 38 | # Print Results 39 | function writeOutput { 40 | Write-Host "Organization Name: `t" -ForegroundColor Gray -NoNewline 41 | Write-Host "`t `t" $organization "`n" 42 | 43 | Write-Host "DHCP Scope Name: `t" -ForegroundColor Gray -NoNewline 44 | Write-Host "`t `t" $Name "`n" 45 | 46 | Write-Host "Getting Server Name: `t" -ForegroundColor Gray -NoNewline 47 | Write-Host "`t `t" $Server "`n" 48 | 49 | Write-Host "Status: `t" -ForegroundColor Gray -NoNewline 50 | Write-Host "`t `t" $organization "`n" 51 | 52 | Write-Host "Scope: `t" -ForegroundColor Gray -NoNewline 53 | Write-Host "`t `t" $Start " - " $End "`n" 54 | } 55 | 56 | if($help) { 57 | Get-Help $MyInvocation.MyCommand.Path 58 | exit 59 | } 60 | 61 | if(($silent) -and !($url -or $file -or $ftp)) { 62 | Write-Error -Message "ERROR: Using the silent flag requires a URL, FTP server, or location to save results to." ` 63 | -Category InvalidOperation ` 64 | } 65 | else { 66 | if($continuum) { 67 | $organization = (Get-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\SAAZOD").SITENAME 68 | } 69 | 70 | # Get DHCP v4 Scopes 71 | $DHCPs = Get-DhcpServerv4Scope 72 | $Server = [System.Net.Dns]::GetHostName() 73 | 74 | ForEach($DHCP in $DHCPs){ 75 | $Start = $DHCP.StartRange 76 | $End = $DHCP.EndRange 77 | $Status = $DHCP.State 78 | $Name = $DHCP.Name 79 | 80 | if(!$silent){writeOutput} 81 | 82 | if($url -or $file -or $ftp) { 83 | $PostData = @{ 84 | Organization = $organization; ` 85 | Name = $Name; ` 86 | Status = $Status; ` 87 | Scope = "$Start - $End"; ` 88 | Server = $Server; 89 | } 90 | } 91 | if($url){ 92 | Invoke-WebRequest -Uri $url -Method POST -Body $PostData 93 | } 94 | if($file) { 95 | $SaveData += New-Object PSObject -Property $PostData 96 | } 97 | } 98 | if($file) { 99 | $SaveData | export-csv -Path $file -NoTypeInformation 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /File Shares/FileShares.flexasset: -------------------------------------------------------------------------------- 1 | Name: File Server/Share 2 | Kind: Header 3 | 4 | Name: Share Name 5 | Kind: Text 6 | Hint: e.g. Sales 7 | Checkboxes: Required, Show in list, Use for title 8 | 9 | Name: Share Description 10 | Kind: Text 11 | Hint: e.g. Sales Information 12 | Checkboxes: Required, Show in list 13 | 14 | Name: Servers 15 | Kind: Tag 16 | Type: Configurations 17 | Hint: Tag servers delivering this share 18 | Checkboxes: Show in list 19 | 20 | Name: Mapped Drive 21 | Kind: Text 22 | Hint: e.g. S:\ 23 | Checkboxes: Show in list, Use for title 24 | 25 | Name: Share Path 26 | Kind: Text 27 | Hint: e.g. \\SERVER\Share 28 | Checkboxes: Show in list 29 | 30 | Name: Disk Path 31 | Kind: Text 32 | Hint: e.g. D:\Share 33 | Checkboxes: Show in list 34 | 35 | Name: Share Permissions 36 | Kind: Textbox 37 | Hint: What members have access? 38 | Checkboxes: Show in list 39 | -------------------------------------------------------------------------------- /File Shares/FileShares.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | This script grabs all shared folders in the current server along with their shared path, disk path and permsissions 4 | 5 | .DESCRIPTION 6 | Options: 7 | 8 | -help - Display the current help menu 9 | -silent - Run the script without printing anything 10 | -url - Give a URL to POST script output to 11 | -file - Declare a location to save script output to as a csv 12 | -organization - Declare the name of the organization 13 | 14 | .NOTES 15 | This script is largely a modification on grolo's "Audit File Share Perms" script available at http://poshcode.org/3398. 16 | We thank grolo for doing a lot of the heavy lifting for us. 17 | 18 | Author: Mark Jacobs 19 | Author: Caleb Albers 20 | 21 | .LINK 22 | https://github.com/KeystoneIT/Documentation-Scripts 23 | 24 | #> 25 | 26 | [cmdletbinding()] 27 | 28 | Param ( 29 | [switch]$help = $False, 30 | [switch]$silent = $False, 31 | [switch]$continuum = $False, 32 | [string]$url, 33 | [string]$file, 34 | [string]$organization = "" 35 | ) 36 | 37 | # Print Results 38 | function writeOutput { 39 | Write-Host "Organization Name: `t" -ForegroundColor Gray -NoNewline 40 | Write-Host "`t `t" $organization "`n" 41 | 42 | Write-Host "Server: `t" -ForegroundColor Gray -NoNewline 43 | Write-Host "`t `t" $currentServer "`n" 44 | 45 | Write-Host "Share Name: `t" -ForegroundColor Gray -NoNewline 46 | Write-Host "`t `t" $share "`n" 47 | 48 | Write-Host "Share Path: `t" -ForegroundColor Gray -NoNewline 49 | Write-Host "`t `t" $writePath "`n" 50 | 51 | Write-Host "Share Description: `t" -ForegroundColor Gray -NoNewline 52 | Write-Host "`t `t" $ShareDescription "`n" 53 | 54 | Write-Host "Disk Path: `t" -ForegroundColor Gray -NoNewline 55 | Write-Host "`t `t" $DiskPath "`n" 56 | 57 | Write-Host "Permissions: `t" -ForegroundColor Gray -NoNewline 58 | Write-Host "`t `t" $permissions "`n" 59 | } 60 | 61 | 62 | if($help) { 63 | Get-Help $MyInvocation.MyCommand.Path 64 | exit 65 | } 66 | 67 | if(($silent) -and !($url -or $file)) { 68 | Write-Error -Message "ERROR: Using the silent flag requires a URL, FTP server, or location to save results to." ` 69 | -Category InvalidOperation ` 70 | } 71 | else { 72 | if($continuum) { 73 | $organization = (Get-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\SAAZOD").SITENAME 74 | } 75 | 76 | $computer = $env:COMPUTERNAME 77 | $results = @() 78 | 79 | $File = gwmi -Class win32_share -ComputerName $computer -Filter "Type=0" 80 | $shares = $File| select -ExpandProperty Name 81 | $description = $File| select -ExpandProperty Description 82 | $path = $File| select -ExpandProperty Path 83 | $server= ([regex]::matches($File, "(?<=[\\][\\])[^\\]+")) 84 | 85 | $i=0 86 | foreach ($share in $shares) { 87 | if( $share -notlike "print$" -or -notlike "NETLOGON" -or -notlike "MTATempStore$"){ 88 | $acl = $null # or $sharePath[$i] 89 | 90 | $permissions= "" 91 | Write-Host $share -ForegroundColor Green 92 | Write-Host $('-' * $share.Length) -ForegroundColor Green 93 | $currentServer= $server[$i] 94 | $writePath = "\\$currentServer\$share" 95 | 96 | 97 | 98 | $file = Get-WMIObject -Class Win32_LogicalShareSecuritySetting -Filter "name='$Share'" -ComputerName $computer 99 | if($file){ 100 | $obj = @() 101 | $ACLS = $file.GetSecurityDescriptor().Descriptor.DACL 102 | foreach($ACL in $ACLS){ 103 | $User = $ACL.Trustee.Name 104 | if(!($user)){$user = $ACL.Trustee.SID} #If there is no username use SID 105 | $Domain = $ACL.Trustee.Domain 106 | switch($ACL.AccessMask) { 107 | 2032127 {$Perm = "Full Control"} 108 | 1245631 {$Perm = "Change"} 109 | 1179817 {$Perm = "Read"} 110 | } 111 | $permissions= $permissions + "

$Domain\$user $Perm

" 112 | } # End foreach $ACL 113 | $ShareDescription= $description[$i] 114 | $DiskPath= $path[$i] 115 | 116 | if(!$silent){writeOutput} 117 | 118 | if($url -or $file) { 119 | $PostData = @{ 120 | "Organization" = "$organization" 121 | "Share Name" = "$share" 122 | "Share Description" = "$ShareDescription" 123 | "Server" = "$currentServer" 124 | "Share Path" = "$writePath" 125 | "Disk Path" = "$DiskPath" 126 | "Permissions" = "$permissions" 127 | } 128 | } 129 | if($url){ 130 | Invoke-WebRequest -Uri $url -Method POST -Body $PostData 131 | } 132 | if($file) { 133 | $SaveData += New-Object PSObject -Property $PostData 134 | } 135 | $i++ 136 | }# end if $file 137 | }# end if(notlike) 138 | } # end foreach $share 139 | if($file){ 140 | $SaveData | export-csv -Path $file -NoTypeInformation 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Documentation-Scripts 2 | A collection of scripts (primarily PowerShell) for documenting client networks and infrastructure. 3 | -------------------------------------------------------------------------------- /Supported Applications/Applications.flexasset: -------------------------------------------------------------------------------- 1 | Name: Name 2 | Kind: Text 3 | Hint: Primary application title without version - e.g. SharePoint, Exchange, Lync, QuickBooks, SQL Server 4 | Checkboxes: Required, Show in List, Use for title 5 | 6 | Name: Category 7 | Kind: Select 8 | Hint: Choose primary category for application 9 | Options: EMR, CRM, Database, ERP, Finance, Learning management / Gradebook, Marketing, Practice Management, Sales, Security, Other 10 | Checkboxes: Show in list 11 | 12 | Name: Version 13 | Kind: Text 14 | Hint: Major and minor version number - e.g. 2008 R2, XP, 7.3 SP1, etc. 15 | Checkboxes: Show in list, Use for title 16 | 17 | Name: Importance 18 | Kind: Select 19 | Hint: Importance of application to organization - e.g. downtime tolerance 20 | Options: Critical, High, Medium, Low 21 | Checkboxes: Show in list 22 | 23 | Name: Business Impact 24 | Kind: Text 25 | Hint: Describe business impact of outage - e.g. sales unable to occur 26 | Checkboxes: Required, Show in list 27 | 28 | Name: Application Champion 29 | Kind: Tag 30 | Type: Contacts 31 | Hint: Select application champion(s) or primary contact(s) 32 | Checkboxes: Show in list 33 | 34 | Name: Application Server(s) 35 | Kind: Tag 36 | Type: Configurations 37 | Checkboxes: 38 | 39 | Name: Vendor 40 | Kind: Tag 41 | Type: Organizations 42 | Hint: Microsoft 43 | Checkboxes: Show in list 44 | 45 | Name: Licensing & Support Information 46 | Kind: Header 47 | 48 | Name: Licensing Information 49 | Kind: Tag 50 | Type: Licensing 51 | Hint: Tag licensing for this application 52 | Checkboxes: 53 | 54 | Name: Warranty/Service Contract 55 | Kind: Tag 56 | Type: Warranty/Service Contracts 57 | Checkboxes: Show in list 58 | 59 | Name: Notes 60 | Kind: Textbox 61 | Hint: Any additional notes 62 | Checkboxes: Show in list 63 | -------------------------------------------------------------------------------- /Supported Applications/FindApps.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | 3 | .SYNOPSIS 4 | This script grabs all installed programs/applications and then compares them to a list of known programs of interest. 5 | This is useful for discovering if common applications like QuickBooks or ShadowProtect are present during initial auditing. 6 | 7 | .DESCRIPTION 8 | Options: 9 | 10 | -help - Display the current help menu 11 | -applications - Give an XML file listing all applications of interest 12 | -silent - Run the script without printing anything 13 | -url - Give a URL to POST script output to 14 | -file - Declare a location to save script output to as a csv 15 | -organization - Declare the name of the organization 16 | 17 | .EXAMPLE 18 | ./FindApps.ps1 -applications C:/apps.xml 19 | ./FindApps.ps1 -app applist.xml -silent -url api.example.com 20 | ./FindApps.ps1 -a input.xml -s -file C:/output.csv 21 | 22 | .NOTES 23 | Author: Mark Jacobs 24 | Author: Caleb Albers 25 | 26 | .LINK 27 | https://github.com/KeystoneIT/Documentation-Scripts 28 | 29 | #> 30 | 31 | 32 | Param ( 33 | [switch]$help = $False, 34 | [switch]$applications = "" 35 | [switch]$silent = $False, 36 | [switch]$continuum = $False, 37 | [string]$url, 38 | [string]$file, 39 | [string]$organization = "" 40 | ) 41 | 42 | # Get Known Application List 43 | [xml]$Applist = Get-Content $applications 44 | 45 | # Print Results 46 | function writeOutput { 47 | Write-Host "Organization Name: `t" -ForegroundColor Gray -NoNewline 48 | Write-Host "`t `t" $organization "`n" 49 | 50 | Write-Host "Application Name: `t" -ForegroundColor Gray -NoNewline 51 | Write-Host "`t `t" $Name "`n" 52 | 53 | Write-Host "Version: `t" -ForegroundColor Gray -NoNewline 54 | Write-Host "`t `t" $Version "`n" 55 | 56 | Write-Host "Publisher: `t" -ForegroundColor Gray -NoNewline 57 | Write-Host "`t `t" $Publisher "`n" 58 | 59 | Write-Host "Install Date: `t" -ForegroundColor Gray -NoNewline 60 | Write-Host "`t `t" $Installed "`n" 61 | 62 | Write-Host "Category: `t" -ForegroundColor Gray -NoNewline 63 | Write-Host "`t `t" $Category[$i] "`n" 64 | 65 | Write-Host $('=' * 50) 66 | } 67 | 68 | if($help) { 69 | Get-Help $MyInvocation.MyCommand.Path 70 | exit 71 | } 72 | 73 | if(($silent) -and !($url -or $file -or $ftp)) { 74 | Write-Error -Message "ERROR: Using the silent flag requires a URL, FTP server, or location to save results to." ` 75 | -Category InvalidOperation ` 76 | } 77 | else { 78 | if($continuum) { 79 | $organization = (Get-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\SAAZOD").SITENAME 80 | } 81 | 82 | 83 | $i=0 84 | 85 | $app = $Applist.Applications.software| select -ExpandProperty name 86 | $category = $Applist.Applications.software| select -ExpandProperty category 87 | $length = $print.Length 88 | 89 | while($i -lt $length){ 90 | ForEach ($inApp in $inApps){ 91 | $Name = $inApp.DisplayName 92 | 93 | if($Name -eq $app[$i]){ 94 | $Version = $inApp.DisplayVersion 95 | $Publisher = $inApp.Publisher 96 | $Installed = $inApp.InstallDate 97 | 98 | if(!$silent){writeOutput} 99 | 100 | if($url -or $file -or $ftp) { 101 | $PostData= @{ 102 | organization = $organization; ` 103 | ApplicationName = $Name; ` 104 | Version = $Version; ` 105 | Publisher = $Publisher; ` 106 | Category = $category[$i]; 107 | } 108 | if($url){ 109 | Invoke-WebRequest -Uri $url -Method POST -Body $PostData 110 | } 111 | if($file) { 112 | $SaveData += New-Object PSObject -Property $PostData 113 | } 114 | } 115 | } $i++ # Increment counter to check the next application 116 | } 117 | if($file){ 118 | $SaveData | export-csv -Path $file -NoTypeInformation 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /Supported Applications/applications.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | --------------------------------------------------------------------------------