From 76f808acd552745c599f2f75e1a9b4b736108087 Mon Sep 17 00:00:00 2001 From: Ivo Oskamp Date: Tue, 24 Feb 2026 15:44:34 +0100 Subject: [PATCH] Restructure repository layout and add English documentation --- .gitignore | 13 ++++++ README.md | 41 ++++++++++++++++++ .../docker}/build-and-push.sh | 0 .../docker}/update-and-build.sh | 0 docs/conventions.md | 40 +++++++++++++++++ docs/runbooks/index.md | 43 +++++++++++++++++++ output/.gitkeep | 0 .../content/convert-md.bat | 0 .../exchange/get-mailbox-with-permissions.ps1 | 0 .../m365/identity/m365-users-mfa.ps1 | 0 .../m365/smtp/Test-SMTPRelay-M365.ps1 | 0 .../m365/smtp/Test-SMTPSend-Auth-M365.ps1 | 0 .../macos/serialToAdminPassword.sh | 0 .../autopilot/Get-WindowsAutoPilotInfo.ps1 | 0 .../windows/endpoint/Update rmm.ps1 | 0 .../windows/endpoint/schedule_reboot.ps1 | 0 .../endpoint/uninstall-MS-Visual-C++-2010.ps1 | 0 uuid.ps1 => scripts/windows/endpoint/uuid.ps1 | 0 18 files changed, 137 insertions(+) create mode 100644 .gitignore create mode 100644 README.md rename {docker-develop => automation/docker}/build-and-push.sh (100%) rename {docker-develop => automation/docker}/update-and-build.sh (100%) create mode 100644 docs/conventions.md create mode 100644 docs/runbooks/index.md create mode 100644 output/.gitkeep rename convert-md.bat => scripts/content/convert-md.bat (100%) rename get-mailbox-with-permissions.ps1 => scripts/m365/exchange/get-mailbox-with-permissions.ps1 (100%) rename m365-users-mfa.ps1 => scripts/m365/identity/m365-users-mfa.ps1 (100%) rename Test-SMTPRelay-M365.ps1 => scripts/m365/smtp/Test-SMTPRelay-M365.ps1 (100%) rename Test-SMTPSend-Auth-M365.ps1 => scripts/m365/smtp/Test-SMTPSend-Auth-M365.ps1 (100%) rename serialToAdminPassword.sh => scripts/macos/serialToAdminPassword.sh (100%) rename Get-WindowsAutoPilotInfo.ps1 => scripts/windows/autopilot/Get-WindowsAutoPilotInfo.ps1 (100%) rename Update rmm.ps1 => scripts/windows/endpoint/Update rmm.ps1 (100%) rename schedule_reboot.ps1 => scripts/windows/endpoint/schedule_reboot.ps1 (100%) rename uninstall-MS-Visual-C++-2010.ps1 => scripts/windows/endpoint/uninstall-MS-Visual-C++-2010.ps1 (100%) rename uuid.ps1 => scripts/windows/endpoint/uuid.ps1 (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6d2033e --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +# Runtime/output +output/* +!output/.gitkeep + +# PowerShell logs/transcripts +*.log +*.txt + +# OS/editor +.DS_Store +Thumbs.db +.vscode/ +.idea/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..1281e28 --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +# Random Scripts + +Collection of operational scripts for Microsoft 365, Windows endpoint management, macOS, and Docker automation. + +## Structure + +- `scripts/m365/smtp/` + - `Test-SMTPRelay-M365.ps1` + - `Test-SMTPSend-Auth-M365.ps1` +- `scripts/m365/exchange/` + - `get-mailbox-with-permissions.ps1` +- `scripts/m365/identity/` + - `m365-users-mfa.ps1` +- `scripts/windows/autopilot/` + - `Get-WindowsAutoPilotInfo.ps1` +- `scripts/windows/endpoint/` + - `Update rmm.ps1` + - `schedule_reboot.ps1` + - `uninstall-MS-Visual-C++-2010.ps1` + - `uuid.ps1` +- `scripts/macos/` + - `serialToAdminPassword.sh` +- `scripts/content/` + - `convert-md.bat` +- `automation/docker/` + - `build-and-push.sh` + - `update-and-build.sh` +- `docs/` + - working practices and conventions +- `output/` + - generated output files (CSV/logs), not committed + +## Important Note + +Existing script filenames are intentionally **unchanged** to preserve compatibility with existing guides and runbooks. + +## Usage + +- Run scripts from the correct environment (PowerShell/Bash/Batch). +- Check required modules/permissions per script. +- Write exports to `output/` when possible. diff --git a/docker-develop/build-and-push.sh b/automation/docker/build-and-push.sh similarity index 100% rename from docker-develop/build-and-push.sh rename to automation/docker/build-and-push.sh diff --git a/docker-develop/update-and-build.sh b/automation/docker/update-and-build.sh similarity index 100% rename from docker-develop/update-and-build.sh rename to automation/docker/update-and-build.sh diff --git a/docs/conventions.md b/docs/conventions.md new file mode 100644 index 0000000..046e1ef --- /dev/null +++ b/docs/conventions.md @@ -0,0 +1,40 @@ +# Repository Conventions + +## 1. Naming + +- Existing script filenames stay unchanged for documentation compatibility. +- New scripts should use clear, stable names and should not be renamed later without a migration plan. + +## 2. Placement + +- Place scripts by platform + domain: + - `scripts/m365/...` + - `scripts/windows/...` + - `scripts/macos/...` + - `scripts/content/...` +- Place build/deploy automation in `automation/...`. + +## 3. Script Header (minimum) + +Use these fields at the top of each script where possible: + +- Purpose/Synopsis +- Requirements (modules, permissions, OS) +- Input parameters +- Output (file/console) +- Example usage + +## 4. Secrets and Variables + +- Do not hardcode secrets. +- Use variables, prompts, or a secure vault mechanism. + +## 5. Output and Logging + +- Default output goes to `output/` unless operational requirements dictate otherwise. +- Use predictable filenames for exports. + +## 6. Change Policy + +- For file moves: update README and relevant guides. +- For any future filename changes: add a temporary compatibility layer (wrapper/alias) and define a deprecation window. diff --git a/docs/runbooks/index.md b/docs/runbooks/index.md new file mode 100644 index 0000000..76731a8 --- /dev/null +++ b/docs/runbooks/index.md @@ -0,0 +1,43 @@ +# Runbooks Index + +This overview helps update guides after the repository restructuring. + +## Important + +- Script filenames were not changed. +- Only folder locations were updated. + +## Script Locations + +- `Get-WindowsAutoPilotInfo.ps1` + - New path: `scripts/windows/autopilot/Get-WindowsAutoPilotInfo.ps1` +- `Test-SMTPRelay-M365.ps1` + - New path: `scripts/m365/smtp/Test-SMTPRelay-M365.ps1` +- `Test-SMTPSend-Auth-M365.ps1` + - New path: `scripts/m365/smtp/Test-SMTPSend-Auth-M365.ps1` +- `Update rmm.ps1` + - New path: `scripts/windows/endpoint/Update rmm.ps1` +- `get-mailbox-with-permissions.ps1` + - New path: `scripts/m365/exchange/get-mailbox-with-permissions.ps1` +- `m365-users-mfa.ps1` + - New path: `scripts/m365/identity/m365-users-mfa.ps1` +- `schedule_reboot.ps1` + - New path: `scripts/windows/endpoint/schedule_reboot.ps1` +- `uninstall-MS-Visual-C++-2010.ps1` + - New path: `scripts/windows/endpoint/uninstall-MS-Visual-C++-2010.ps1` +- `uuid.ps1` + - New path: `scripts/windows/endpoint/uuid.ps1` +- `serialToAdminPassword.sh` + - New path: `scripts/macos/serialToAdminPassword.sh` +- `convert-md.bat` + - New path: `scripts/content/convert-md.bat` +- `build-and-push.sh` + - New path: `automation/docker/build-and-push.sh` +- `update-and-build.sh` + - New path: `automation/docker/update-and-build.sh` + +## Guide Update Checklist + +- Replace references to root-level paths with the new paths above. +- Check automated jobs/tasks for hardcoded script locations. +- Test at least one script per domain after path updates. diff --git a/output/.gitkeep b/output/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/convert-md.bat b/scripts/content/convert-md.bat similarity index 100% rename from convert-md.bat rename to scripts/content/convert-md.bat diff --git a/get-mailbox-with-permissions.ps1 b/scripts/m365/exchange/get-mailbox-with-permissions.ps1 similarity index 100% rename from get-mailbox-with-permissions.ps1 rename to scripts/m365/exchange/get-mailbox-with-permissions.ps1 diff --git a/m365-users-mfa.ps1 b/scripts/m365/identity/m365-users-mfa.ps1 similarity index 100% rename from m365-users-mfa.ps1 rename to scripts/m365/identity/m365-users-mfa.ps1 diff --git a/Test-SMTPRelay-M365.ps1 b/scripts/m365/smtp/Test-SMTPRelay-M365.ps1 similarity index 100% rename from Test-SMTPRelay-M365.ps1 rename to scripts/m365/smtp/Test-SMTPRelay-M365.ps1 diff --git a/Test-SMTPSend-Auth-M365.ps1 b/scripts/m365/smtp/Test-SMTPSend-Auth-M365.ps1 similarity index 100% rename from Test-SMTPSend-Auth-M365.ps1 rename to scripts/m365/smtp/Test-SMTPSend-Auth-M365.ps1 diff --git a/serialToAdminPassword.sh b/scripts/macos/serialToAdminPassword.sh similarity index 100% rename from serialToAdminPassword.sh rename to scripts/macos/serialToAdminPassword.sh diff --git a/Get-WindowsAutoPilotInfo.ps1 b/scripts/windows/autopilot/Get-WindowsAutoPilotInfo.ps1 similarity index 100% rename from Get-WindowsAutoPilotInfo.ps1 rename to scripts/windows/autopilot/Get-WindowsAutoPilotInfo.ps1 diff --git a/Update rmm.ps1 b/scripts/windows/endpoint/Update rmm.ps1 similarity index 100% rename from Update rmm.ps1 rename to scripts/windows/endpoint/Update rmm.ps1 diff --git a/schedule_reboot.ps1 b/scripts/windows/endpoint/schedule_reboot.ps1 similarity index 100% rename from schedule_reboot.ps1 rename to scripts/windows/endpoint/schedule_reboot.ps1 diff --git a/uninstall-MS-Visual-C++-2010.ps1 b/scripts/windows/endpoint/uninstall-MS-Visual-C++-2010.ps1 similarity index 100% rename from uninstall-MS-Visual-C++-2010.ps1 rename to scripts/windows/endpoint/uninstall-MS-Visual-C++-2010.ps1 diff --git a/uuid.ps1 b/scripts/windows/endpoint/uuid.ps1 similarity index 100% rename from uuid.ps1 rename to scripts/windows/endpoint/uuid.ps1