WinDirOps.psd1
# # Module manifest for module 'WinDirOps' # # Generated by: LarryWisherMan # # Generated on: 9/6/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'WinDirOps.psm1' # Version number of this module. ModuleVersion = '0.2.0' # Supported PSEditions # CompatiblePSEditions = @() # ID used to uniquely identify this module GUID = 'c10e2a02-1d3e-4b28-8242-8e70c0865e44' # Author of this module Author = 'LarryWisherMan' # Company or vendor of this module CompanyName = 'LarryWisherMan' # Copyright statement for this module Copyright = '(c) 2024 LarryWisherMan. All rights reserved.' # Description of the functionality provided by this module Description = 'The **WinDirOps** module provides a comprehensive set of PowerShell functions to interact with the Windows file system, offering a simplified interface for common directory operations such as clearing, removing, and managing directories both locally and remotely. It abstracts the complexity of working with local and network file paths, handling both direct access and remote operations via PowerShell remoting. The module is designed to handle tasks like deleting directory contents, syncing empty directories for fast deletion, and removing directories with detailed error handling. It enables seamless interaction with the file system, whether performing maintenance tasks on local folders or managing directories across multiple remote systems. This module can be used independently or as a dependency for higher-level file management or system configuration modules, offering flexibility and reliability in directory management operations. --- ### **Key Features:** - **Clear directory contents (local and remote).** - **Remove directories safely** with built-in confirmation and error handling. - **Sync directories** for fast deletion using efficient methods like `robocopy`. - **Handle both local and UNC paths** seamlessly, converting paths automatically for remote access. - **Detailed status reporting** on directory operations, providing success or failure messages. --- ### **Typical Use Cases:** - **Automating system cleanup:** Regularly clear out temporary or outdated directories, both on local machines and remote servers. - **Managing directories during deployments:** Clear and reset build directories as part of an automated deployment or CI/CD process. - **Remote directory management:** Delete, clear, or manage folders on remote systems without needing manual access. - **File system maintenance:** Use **WinDirOps** to ensure file system cleanliness and order during regular system maintenance tasks.' # Minimum version of the Windows PowerShell engine required by this module PowerShellVersion = '5.1' # Name of the Windows PowerShell host required by this module # PowerShellHostName = '' # Minimum version of the Windows PowerShell host required by this module # PowerShellHostVersion = '' # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # DotNetFrameworkVersion = '' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. # CLRVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @( @{ ModuleName = 'WisherTools.Helpers' ModuleVersion = '0.2.0' } ) # Assemblies that must be loaded prior to importing this module # RequiredAssemblies = @() # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module # TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = @('Clear-Directory','Clear-DirectoryContents','Invoke-MirRoboCopy','Remove-DirectoryByType','Remove-LocalDirectory','Remove-RemoteDirectory') # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = @() # Variables to export from this module VariablesToExport = @() # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = @() # DSC resources to export from this module DscResourcesToExport = @() # List of all modules packaged with this module # ModuleList = @() # List of all files packaged with this module # FileList = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ Prerelease = '' # Tags applied to this module. These help with module discovery in online galleries. Tags = @( 'WindowsDirectories', 'DirectoryManagement', 'FileSystemOperations', 'LocalDirectories', 'RemoteDirectories', 'PowerShellRemoting', 'DirectoryCleanup', 'Automation', 'UNCPaths', 'FileMaintenance', 'SystemAdministration', 'ErrorHandling', 'DeploymentTasks', 'RemoteManagement', 'WindowsManagement' ) # A URL to the license for this module. LicenseUri = 'https://github.com/LarryWisherMan/WinDirOps/blob/main/LICENSE' # A URL to the main website for this project. ProjectUri = 'https://github.com/LarryWisherMan/WinDirOps' # A URL to an icon representing this module. IconUri = 'https://raw.githubusercontent.com/LarryWisherMan/ModuleIcons/main/WinDirOps.png' # ReleaseNotes of this module ReleaseNotes = '## [0.2.0] - 2024-09-10 ### Added - Added core functions - Updated build file for release - Added new function `Invoke-MirRoboCopy` to wrap robocopy functionality - Added `ShouldProcess` support to all public directory-related functions to enable safer operations using `-WhatIf` and `-Confirm`: - Functions updated: - `Clear-Directory` - `Clear-DirectoryContents` - `Remove-LocalDirectory` - `Remove-RemoteDirectory` - `Remove-DirectoryByType` - `Invoke-MirRoboCopy` - Added remote computer availability check using `Test-ComputerPing` (see [WisherTools.Helpers](https://github.com/LarryWisherMan/WisherTools.Helpers)) for functions dealing with remote directories (`Remove-RemoteDirectory` and `Remove-DirectoryByType`). These functions now return a `FolderDeletionResult` indicating if the computer is offline and abort the operation if it is unreachable. - Added enhanced error handling to return detailed failure messages, including when a remote computer is offline or the deletion operation fails. - Created `Invoke-RobocopyCommand` as a private wrapper for robocopy - Created `New-FolderDeletionResult` for `FolderDeletionResult` object creation ### Changed - Updated functions to implement `Invoke-MirRoboCopy` for faster and safer directory content clearing using robocopy. - Suppressed nested confirmation prompts in internal function calls by passing `-Confirm:$false` to internal operations, preventing multiple confirmation requests during execution. - Improved comment-based help for all functions to clearly explain local vs. remote operations, the role of `ShouldProcess`, and how the remote computer checks are handled. - updated `Remove-LocalDirectory` and `Remove-RemoteDirectory` to use new wrapper function `New-FolderDeletionResult` for `FolderDeletionResult` object creation ' } # End of PSData hashtable } # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. # DefaultCommandPrefix = '' } |