WinRegOps

0.4.0-preview0004

The WinRegOps module provides a comprehensive set of PowerShell functions to interact with the Windows registry, offering a simplified interface for common operations such as reading, writing, and deleting registry keys and values. It acts as a wrapper around the Microsoft.Win32.RegistryKey .NET class, extending its functionality for both local and remote registry ope
The WinRegOps module provides a comprehensive set of PowerShell functions to interact with the Windows registry, offering a simplified interface for common operations such as reading, writing, and deleting registry keys and values. It acts as a wrapper around the Microsoft.Win32.RegistryKey .NET class, extending its functionality for both local and remote registry operations.

The module is designed to handle tasks like retrieving specific registry values, exporting registry keys, managing subkeys, and removing keys with enhanced error handling. It allows for seamless interaction with the Windows registry across various environments and use cases, such as system configuration, profile management, and application settings.

This module can be used independently or as a dependency for higher-level management modules, offering flexibility and reliability in registry operations.

Key features:

- Open registry keys (local and remote).
- Query and retrieve registry values.
- Create, delete, and backup registry keys and subkeys.
- Built-in error handling for permission issues and remote access.
- Works with multiple registry hives (e.g., HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER).

Typical use cases include:
- Simplifying registry access in complex automation tasks.
- Providing a reliable registry management layer for other modules like ProfileManagement.
- Managing the lifecycle of registry keys during system configuration changes.
Show more

Minimum PowerShell version

5.1

This is a prerelease version of WinRegOps.

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name WinRegOps -AllowPrerelease

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name WinRegOps -Prerelease

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2024 LarryWisherMan. All rights reserved.

Package Details

Author(s)

  • LarryWisherMan

Tags

Windows Registry RemoteRegistry ProfileManagement SystemConfiguration RegistryOperations Automation PowerShell

Functions

Backup-RegistryKey Export-RegistryKey Get-RegistrySubKey Get-RegistryValue Get-RegistryValueKind Get-RegistryValueNames New-RegistryKeyValuesObject Open-RegistryKey Remove-RegistrySubKey Remove-RegistrySubKeyTree

Dependencies

Release Notes

## [0.4.0-preview0004] - 2024-09-24

### Added

- `Get-RegistrySubKey` to replace `Open-RegistrySubKey`. This implementation follows
the .net class better

- `Invoke-DeleteSubKey` and `Invoke-DeleteSubKeyTree` private functions for removing
subkeys

- `Remove-RegistrySubKey` and `Removing-RegistryKeyTree` public
public implementation

- New Private function `Get-RegistrySubKeyOperation` for managing the logic of
opening a key or using an existing one provided in `Remove-RegistrySubKey`

- **`New-RegistryKeyValuesObject`**:
 - Retrieves and exports all the values of a specified registry key or subkey
 into a custom object. The object includes the registry path, backup date, user,
  computer name, and a dictionary of the key's values (including data type and value).

 - Supports backing up both root keys and subkeys.

- **`Get-RegistryValueNames`**:
 - Retrieves all the value names from a specified registry key. This function
 simplifies the process of listing all registry values for a given key.

- **`Get-RegistryValueKind`**:
 - Retrieves the type (kind) of a specified registry key value. This allows for
  easy identification of value types such as `String`, `DWord`, and `Binary`
   within registry keys.

### Fixed

- Error Handling for `[System.Security.SecurityException]` in `Open-RegistryKey`

### Changed

- `Get-RegistrySubKey` includes an alias for `Open-RegistrySubKey` to for compatibility
- `Open-RegistryKey` too make `-RegistryPath` optional to return the root hive

FileList

Version History

Version Downloads Last updated
0.4.0-previe... (current version) 3 9/24/2024
0.4.0-previe... 17 9/18/2024
0.4.0-previe... 4 9/17/2024
0.4.0-previe... 8 9/16/2024
0.3.0 23 9/11/2024
0.3.0-previe... 2 9/11/2024
0.3.0-previe... 8 9/9/2024
0.3.0-previe... 2 9/9/2024
0.2.0 8 9/9/2024
Show more