Update readme.md
Some checks are pending
PSScriptAnalyzer / PSScriptAnalyzer (push) Waiting to run

This commit is contained in:
Maximilian Krieger 2025-01-28 08:48:24 +01:00
parent d0c16c6c29
commit 29bba81164
2 changed files with 29 additions and 28 deletions

View File

@ -25,9 +25,8 @@
Just output on screen Just output on screen
.NOTES .NOTES
Version: 1.2 Version: 1.2
Author: Singleton Factory GmbH Author: Heko Büroservice GmbH & Co. KG.
Creation Date: 2023-01-18 Creation Date: 2025-01-28
Purpose/Change: New company, new luck
.EXAMPLE .EXAMPLE
.\msoffice-removal-tool.ps1 -InstallOffice365 -SupressReboot .\msoffice-removal-tool.ps1 -InstallOffice365 -SupressReboot
#> #>
@ -175,22 +174,23 @@ Function Invoke-RebootInSeconds($Seconds) {
} }
Function Set-CurrentStage($StageValue) { Function Set-CurrentStage($StageValue) {
if (-not (Test-Path "HKLM:\Software\OEM\Singleton-Factory-GmbH\M365\Install")) { if (-not (Test-Path "HKLM:\Software\OEM\Heko-Bueroservice-GmbH\M365\Install")) {
New-Item -Path "HKLM:\Software\OEM\Singleton-Factory-GmbH\M365\Install" -Force | Out-Null New-Item -Path "HKLM:\Software\OEM\Heko-Bueroservice-GmbH\M365\Install" -Force | Out-Null
} }
New-ItemProperty -Path "HKLM:\Software\OEM\Singleton-Factory-GmbH\M365\Install" -Name "CurrentStage" -Value $StageValue -PropertyType String -Force | Out-Null New-ItemProperty -Path "HKLM:\Software\OEM\Heko-Bueroservice-GmbH\M365\Install" -Name "CurrentStage" -Value $StageValue -PropertyType String -Force | Out-Null
} }
Function Invoke-Intro { Function Invoke-Intro {
Write-Host " __ _ _ _ ___ _ " Write-Host " _ _ _ ______ _ _ _ "
Write-Host " / _(_)_ __ __ _| | ___| |_ ___ _ __ / __\_ _ ___| |_ ___ _ __ _ _ " Write-Host "| | | | | | | ___ (_) (_) (_) "
Write-Host " \ \| | '_ \ / _' | |/ _ \ __/ _ \| '_ \ / _\/ _' |/ __| __/ _ \| '__| | | |" Write-Host "| |_| | ___| | _____ | |_/ /_ _ _ __ ___ ___ ___ _ ____ ___ ___ ___ "
Write-Host " _\ \ | | | | (_| | | __/ || (_) | | | | / / | (_| | (__| || (_) | | | |_| |" Write-Host "| _ |/ _ \ |/ / _ \ | ___ \ | | | '__/ _ \/ __|/ _ \ '__\ \ / / |/ __/ _ \"
Write-Host " \__/_|_| |_|\__, |_|\___|\__\___/|_| |_| \/ \__,_|\___|\__\___/|_| \__, |" Write-Host "| | | | __/ < (_) | | |_/ / |_| | | | (_) \__ \ __/ | \ V /| | (_| __/"
Write-Host " |___/ |___/ " Write-Host "\_| |_/\___|_|\_\___/ \____/ \__,_|_| \___/|___/\___|_| \_/ |_|\___\___|"
Write-Host ""
Write-Host "Microsoft Office Removal Tool" Write-Host "Microsoft Office Removal Tool"
Write-Host "by Aaron Viehl (Singleton Factory GmbH)" Write-Host "by Max Krieger"
Write-Host "singleton-factory.de" Write-Host "heko-bs.de"
Write-Host "" Write-Host ""
} }
@ -209,8 +209,8 @@ if (-Not $Force) {
Invoke-Intro Invoke-Intro
# Check if there is a stage to resume # Check if there is a stage to resume
if (-not ($RunAgain)) { if (-not ($RunAgain)) {
if (Test-Path "HKLM:\Software\OEM\Singleton-Factory-GmbH\M365\Install") { if (Test-Path "HKLM:\Software\OEM\Heko-Bueroservice-GmbH\M365\Install") {
$CurrentStageValue = (Get-ItemProperty "HKLM:\Software\OEM\Singleton-Factory-GmbH\M365\Install").CurrentStage $CurrentStageValue = (Get-ItemProperty "HKLM:\Software\OEM\Heko-Bueroservice-GmbH\M365\Install").CurrentStage
Switch ($CurrentStageValue) { Switch ($CurrentStageValue) {
1 { 1 {
Write-Host "Resuming Stage 1: Uninstalling Office ..." Write-Host "Resuming Stage 1: Uninstalling Office ..."

View File

@ -1,16 +1,17 @@
# Microsoft Office Removal Tool # Microsoft Office Removal Tool
```plain ```plain
__ _ _ _ ___ _
/ _(_)_ __ __ _| | ___| |_ ___ _ __ / __\_ _ ___| |_ ___ _ __ _ _ _ _ _ ______ _ _ _
\ \| | '_ \ / _` | |/ _ \ __/ _ \| '_ \ / _\/ _` |/ __| __/ _ \| '__| | | | | | | | | | | ___ (_) (_) (_)
_\ \ | | | | (_| | | __/ || (_) | | | | / / | (_| | (__| || (_) | | | |_| | | |_| | ___| | _____ | |_/ /_ _ _ __ ___ ___ ___ _ ____ ___ ___ ___
\__/_|_| |_|\__, |_|\___|\__\___/|_| |_| \/ \__,_|\___|\__\___/|_| \__, | | _ |/ _ \ |/ / _ \ | ___ \ | | | '__/ _ \/ __|/ _ \ '__\ \ / / |/ __/ _ \
|___/ |___/ | | | | __/ < (_) | | |_/ / |_| | | | (_) \__ \ __/ | \ V /| | (_| __/
\_| |_/\___|_|\_\___/ \____/ \__,_|_| \___/|___/\___|_| \_/ |_|\___\___|
Microsoft Office Removal Tool Microsoft Office Removal Tool
by Aaron Viehl (Singleton Factory GmbH) by Max Krieger
singleton-factory.de heko-bs.de
``` ```
## Synopsis ## Synopsis
@ -40,7 +41,7 @@ By using `-UseSetupRemoval` the Office365 setup method will be used.
## Stage mechanism ## Stage mechanism
To make sure that the program will only do the necessary parts a _stage mechanism_ is builtin. After every stage a registry value will be written to ``HKLM:\Software\OEM\Singleton-Factory-GmbH\M365\Install\CurrentStage`` To make sure that the program will only do the necessary parts a _stage mechanism_ is builtin. After every stage a registry value will be written to ``HKLM:\Software\OEM\Heko-Bueroservice-GmbH\M365\Install\CurrentStage``
To overwrite all stages and restart the whole script use ``-RunAgain``. To overwrite all stages and restart the whole script use ``-RunAgain``.
@ -49,5 +50,5 @@ To overwrite all stages and restart the whole script use ``-RunAgain``.
You may use this script without explicit download: You may use this script without explicit download:
```powershell ```powershell
iwr https://raw.githubusercontent.com/Admonstrator/msoffice-removal-tool/main/msoffice-removal-tool.ps1 -OutFile msoffice-removal-tool.ps1; powershell -ExecutionPolicy Bypass .\msoffice-removal-tool.ps1 iwr https://git.heko-technik.de/mkrieger/msoffice-removal-tool/raw/branch/main/msoffice-removal-tool.ps1 -OutFile msoffice-removal-tool.ps1; powershell -ExecutionPolicy Bypass .\msoffice-removal-tool.ps1
``` ```