This is a simple Powershell module that wraps the WinRAR command line into Powershell cmdlets with easier to read parameter naming
PSWinRAR can be easily installed by using Install-Module -Name PSWinRAR inside of powershell, after which the functions are usable
Compress-WinRARis used to compress the contents of the directory specified in-DirectoryToCompressinto the .rar file specified in-ArchivePathExpand-WinRARis used to decompress the contents of the .rar file specified in-ArchivePathinto the directory specified in-TargetDirectoryTest-WinRARis a wrapper forCheck-WinRARwhich returns$trueifCheck-WinRARreturns0, and returns$falseotherwise. If the Switch-Parameter-GetReturnCodeis set, the returncode from the winrar executable is returned insteadRepair-WinRARis used to check an archive for errors and correct them which returns$trueif the WinRAR executable returns0, and returns$falseotherwise. If the Switch-Parameter-GetReturnCodeis set, the returncode from the winrar executable is returned instead