An open API service indexing awesome lists of open source software.

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.

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!