https://github.com/adnervl/duowin2login
Automated PowerShell script for remotely uninstalling and reinstalling Duo Authentication for Windows Logon, designed to simplify authentication management across Windows hosts with robust error handling and secure credential management.
https://github.com/adnervl/duowin2login
active-directory automation-scripts duo-security powershell powershell-script remote-access-tool
Last synced: 11 months ago
JSON representation
Automated PowerShell script for remotely uninstalling and reinstalling Duo Authentication for Windows Logon, designed to simplify authentication management across Windows hosts with robust error handling and secure credential management.
- Host: GitHub
- URL: https://github.com/adnervl/duowin2login
- Owner: AdnerVL
- Created: 2024-11-19T18:53:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-12T13:33:10.000Z (about 1 year ago)
- Last Synced: 2025-01-03T21:19:32.699Z (about 1 year ago)
- Topics: active-directory, automation-scripts, duo-security, powershell, powershell-script, remote-access-tool
- Language: PowerShell
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ Duo Authentication Reinstallation Script
## ๐ Overview
This PowerShell script automates the uninstallation and reinstallation of the Duo Authentication for Windows Logon application on a remote Windows host.
## ๐ค Disclaimer
**AI-Assisted Development**
This script was created with significant assistance from AI technologies. As the creator is not a professional PowerShell or software developer, the code reflects a collaborative approach between human intent and AI-generated solution.
## โจ Features
* ๐ Remotely uninstall existing Duo Authentication
* ๐ฅ Download latest Duo Authentication installer
* ๐ ๏ธ Install Duo Authentication with configurable parameters
* ๐ก๏ธ Robust error handling and logging
* ๐งน Automatic cleanup of temporary files
## ๐ Prerequisites
* ๐ป PowerShell 5.0 or higher
* ๐ Administrative access to target Windows machine
* ๐ Network connectivity to the remote host
* ๐ Valid Duo Security credentials (IKEY and SKEY)
## ๐ฆ Usage
### ๐ ๏ธ 1. Environment Configuration
* Create a `.env` file in the script directory with your credentials:
```plaintext
IKEY=your_integration_key
SKEY=your_secret_key
DHOST=your-duo-host.com
```
### ๐ 2. Run the Script
```powershell
.\DuoLoginReinstall.ps1 [COMPUTER_NAME]
```
## ๐ ๏ธ Configuration
The script now uses environment variables for sensitive information:
* ๐ฆ $duoVersion: Duo Authentication version
* ๐ $ikey: Loaded from .env file
* ๐ $skey: Loaded from .env file
* ๐ $dhost: Loaded from .env file
## ๐ Logging
Installation logs are saved to C:\Tools\DuoInstall.log
## โ ๏ธ Caution
* ๐ก๏ธ Ensure you have proper authorization before running on any system
* ๐งช Test in a controlled environment first
* ๐ Requires administrative permissions
## ๐ Security Best Practices
* ๐ Add .env to .gitignore
* ๐ซ Never commit sensitive credentials to version control
* ๐ Rotate credentials periodically
## ๐ License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
## ๐ค Contributing
Contributions, improvements, and bug reports are welcome!