-
Notifications
You must be signed in to change notification settings - Fork 0
Merge ADAuditZip
external help file: ADAuditTasks-help.xml Module Name: ADAuditTasks online version: https://github.com/CriticalSolutionsNetwork/ADAuditTasks/wiki/Merge-ADAuditZip schema: 2.0.0
Combines multiple audit report files into a single compressed ZIP file.
Merge-ADAuditZip [[-FilePaths] <String[]>] [[-MaxFileSize] <Int32>] [[-OutputFolder] <String>] [-OpenDirectory]
[<CommonParameters>]
The Merge-ADAuditZip function combines multiple audit report files into a single compressed ZIP file. The function takes an array of file paths, a maximum file size for the output ZIP file, an output folder for the merged file, and an optional switch to open the directory of the merged file after creation.
$workstations = Get-ADHostAudit -HostType WindowsWorkstations -Report
$servers = Get-ADHostAudit -HostType WindowsServers -Report
$nonWindows = Get-ADHostAudit -HostType "Non-Windows" -Report
Merge-ADAuditZip -FilePaths $workstations, $servers, $nonWindows
This example combines three audit reports for Windows workstations, Windows servers, and non-Windows hosts into a single compressed ZIP file.
Merge-ADAuditZip -FilePaths C:\AuditReports\Report1.csv,C:\AuditReports\Report2.csv -MaxFileSize 50MB -OutputFolder C:\MergedReports -OpenDirectory
This example merges two audit reports into a single compressed ZIP file with a maximum file size of 50 MB, an output folder of C:\MergedReports, and opens the directory of the merged compressed ZIP file after creation.
Specifies an array of file paths to be merged into a single compressed ZIP file.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the maximum file size (in bytes) for the output ZIP file. The default value is 24 MB.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: 25165824
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies an optional switch to open the directory of the merged compressed ZIP file after creation.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the output folder for the merged compressed ZIP file. The default folder is C:\temp.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: C:\temp
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This function will split the output file into multiple parts if the maximum file size is exceeded. If the size exceeds the limit, a new ZIP file will be created with an incremental number added to the file name.
This function may or may not work with various types of input.
https://github.com/CriticalSolutionsNetwork/ADAuditTasks/wiki/Merge-ADAuditZip
https://criticalsolutionsnetwork.github.io/ADAuditTasks/#Merge-ADAuditZip