├── LICENSE ├── README.md └── servermap /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2022, Rocketman 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Server Map 2 | 3 | Creates a map of Jamf Pro server objects to see which are in use and which can be deprecated/deleted. 4 | 5 | 6 | 7 | - [Server Map](#server-map) 8 | - [Access](#access) 9 | - [Usage](#usage) 10 | - [Examples](#examples) 11 | - [Sample Output](#sample-output) 12 | - [Where's the source code?](#wheres-the-source-code) 13 | - [TODO](#todo) 14 | - [Disclaimer](#disclaimer) 15 | 16 | 17 | 18 | ## Access 19 | You will need a Jamf Pro account with _Auditor_ level access. 20 | 21 | ## Usage 22 | The following parameters are required: 23 | 24 | - **-u | --url** - Full URL to server (e.g. --url='https://rocketman.jamfcloud.com') 25 | - **-l | --login** - Username (e.g. -l rocketman) 26 | - **-p | --pass** - Password - It is ***strongly*** advised to single quote this parameter 27 | 28 | ## Examples 29 | 30 | ```txt 31 | ./servermap -u 'https://rocketman.jamfcloud.com' -l healthcheck -p 'Jamf1234!' 32 | ./servermap --url='https://rocketman.jamfcloud.com' --login=healthcheck --pass='Jamf1234!' 33 | ``` 34 | 35 | ## Sample Output 36 | 37 | Note: The numbers in parenthesis at the end of the line refer to the object ID. For example, in the abbreviated sample output below, there are the following lines: 38 | 39 | ```txt 40 | Active Scripts: 41 | --------------- 42 | Easy Button (1) 43 | SS: Easy Button (48) 44 | ``` 45 | 46 | This says that the script, "Easy Button" has a script ID of 1 and is deployed in the policy, "SS: Easy Button" which has a policy ID of 48. 47 | 48 | ```ext 49 | Creating tables... 50 | Getting scripts... 51 | Getting packages... 52 | Getting extension attributes... 53 | Getting policies... 54 | Getting profiles... 55 | Getting groups... 56 | Creating Reports... 57 | 58 | 59 | 60 | Disabled Policies: 61 | ------------------ 62 | 0. Jamf Connect Launch Agent and Designs (53) 63 | 0. Rosetta (50) 64 | 1. Firefox (44) 65 | 2. Google Chrome (43) 66 | 3. Microsoft Office (45) 67 | 4. Cache Install macOS Big Sur.app (47) 68 | macOS Update (57) 69 | SS Easy Button M1 (54) 70 | SS: Easy Button (48) 71 | 72 | Active Scripts: 73 | --------------- 74 | Easy Button (1) 75 | SS: Easy Button (48) 76 | Install Rosetta (2) 77 | 0. Rosetta (50) 78 | Easy Button M1 (4) 79 | SS Easy Button M1 (54) 80 | Install TeamViewer (6) 81 | TeamViewer Deployment (55) 82 | Bootstrap : Install (7) 83 | Bootstrap Token Install (56) 84 | Bootstrap : Password Prompt (8) 85 | Bootstrap Token Install (56) 86 | Onboarding with DEPNotify (10) 87 | 0.0 Onboarding (59) 88 | Cisco AnyConnect Choices XML (11) 89 | 1.1 Cisco AnyConnect (61) 90 | Backdoor Admin 3.0 (27) 91 | Backdoor Admin 3.0 (77) 92 | 93 | Orphaned Scripts: 94 | ----------------- 95 | onboarding.sh (5) 96 | Bootstrap : Install Backdoor Admin (14) 97 | CIS Remediation: Login Window (20) 98 | CIS Remediation: Disable Content Caching (23) 99 | CIS Remediation: Screen Saver Get Inactivity Interval (24) 100 | CIS Remediation: Time Zone Set Automatically (26) 101 | 102 | Packages in use: 103 | ---------------- 104 | NoMAD.pkg (24) 105 | 1.2 NoMAD (62) 106 | NoMAD-LaunchAgent.pkg (25) 107 | 1.2 NoMAD (62) 108 | Firefox 85.0.pkg (36) 109 | 1. Firefox (44) 110 | Google Chrome 88.0.4324.146 .pkg (37) 111 | 2. Google Chrome (43) 112 | RocketmanLogoandBackground.pkg (39) 113 | 0. Jamf Connect Launch Agent and Designs (53) 114 | JamfConnectLaunchAgent.pkg (40) 115 | 0. Jamf Connect Launch Agent and Designs (53) 116 | TeamViewer.dmg (43) 117 | TeamViewer Deployment (55) 118 | Microsoft_Office_16.54.21101001_BusinessPro_Installer.pkg (44) 119 | 1.3 Install Microsoft Office (63) 120 | DEPNotify v1.1.6.pkg (45) 121 | 0.0 Onboarding (59) 122 | Enrollment Videos.pkg (46) 123 | 0.0 Onboarding (59) 124 | Rocketman R.pkg (54) 125 | 0.0 Onboarding (59) 126 | Rocketman-VPN.xml-BigSur.pkg (55) 127 | 1.1 Cisco AnyConnect (61) 128 | JamfConnectLaunchAgent2.5.pkg (59) 129 | Jamf Connect (74) 130 | Jamf Connect 2.6.pkg (60) 131 | Jamf Connect (74) 132 | 133 | Orphaned Packages: 134 | ------------------ 135 | VLC 3.0.6.pkg (17) 136 | VMware Fusion 11.1.0.pkg (18) 137 | Dropbox 74.4.115.pkg (19) 138 | GoogleChrome_74.0.3729.169.pkg (20) 139 | Google Chrome 75.0.3770.80.pkg (21) 140 | Google Chrome pref.pkg (22) 141 | NoMADLoginAD-1.2.2.pkg (26) 142 | JamfConnectSync-1.0.9.pkg (30) 143 | JamfConnectSyncLA-1.0.pkg (31) 144 | JamfConnectLoginOkta-1.6.0.pkg (32) 145 | Google Chrome.pkg (33) 146 | JamfConnect.pkg (35) 147 | TeamviewerChoices.pkg (42) 148 | JamfConnect-2.5.0.pkg (58) 149 | 150 | Extension Attributes in Groups: 151 | ------------------------------- 152 | Battery Health Status (4) 153 | M: Battery is dying (12) 154 | Bootstrap (7) 155 | Bootstrap Token : Installed (20) 156 | Bootstrap Token : Not Installed (21) 157 | Chipset (6) 158 | M: M1 and Big Sur Cached (18) 159 | S: M1 (17) 160 | 161 | Orphaned Extension Attributes: 162 | ------------------------------ 163 | Last Reboot (1) 164 | Battery Health (2) 165 | Battery Health Status (Jamf Nation) (5) 166 | Secure Token users (8) 167 | Bootstrap Crypto Users (9) 168 | Breakglass Admin Password (10) 169 | 170 | Groups in use by other objects: 171 | ------------------------------- 172 | macOS Big Sur Cache (16) 173 | Policy 174 | SS: Easy Button (48) 175 | SubGroup 176 | M: M1 and Big Sur Cached (18) 177 | S: M1 (17) 178 | Policy 179 | SS: Easy Button (48) 180 | Bootstrap Token : Not Installed (21) 181 | Policy 182 | Bootstrap Token Install (56) 183 | S: Has Cisco AnyConnect (23) 184 | Policy 185 | 1.1 Cisco AnyConnect (61) 186 | S: Has NoMAD (24) 187 | Policy 188 | 1.2 NoMAD (62) 189 | Exclusions (31) 190 | Profile 191 | Rocketman Wifi (46) 192 | AnyConnect PPPC (47) 193 | NoMAD Configuration (48) 194 | Approved AnyConnect System and Kernel Extensions (54) 195 | McAfee System Extension (55) 196 | R: Jamf Connect Pilot (32) 197 | Profile 198 | GUI Jamf Connect AZURE (56) 199 | GUI Jamf Connect Login AZURE (61) 200 | 201 | Orphaned Groups: 202 | ---------------- 203 | Bootstrap Token : Installed (20) 204 | M: Battery is dying (12) 205 | M: Has Branding (15) 206 | S: Does Not Have InTune Company Portal App (13) 207 | S: Has Company Portal (14) 208 | S: Has Google Chrome (10) 209 | S: Pilot Computers (11) 210 | ``` 211 | 212 | ## Where's the source code? 213 | 214 | This script is built in Python 3.x and (currently) relies on a number of libraries that have to be installed in order to use it. Not to mention, the code is _very experimental_ and, if I'm honest, embarrassing to look at. 215 | 216 | Once the executable version has been tested a bit more, a few more features are added, and I've had a chance to clean up the code; we'll look at releasing the source as well. 217 | 218 | ## TODO 219 | - [ ] Clean up output 220 | - [ ] Add options for which sections are included 221 | - [ ] Create a markdown format option 222 | - [ ] Add list of ~~disabled or~~ un-scoped policies 223 | - [ ] Add list of un-scoped configuration profiles 224 | 225 | ## Disclaimer 226 | This code is ***extremely*** alpha test right now. There is a lot of functionality that needs to be added and the output is hideous. And while it uses get/read-only calls to the API, we still can't guarantee that it won't rise up and destroy all the humans or something. So... no promises, okay? 227 | -------------------------------------------------------------------------------- /servermap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rocketman-Tech/ServerMap/6dca3f4d64927497de8f96b2da879ba0b1fc48c9/servermap --------------------------------------------------------------------------------