File tree Expand file tree Collapse file tree 1 file changed +74
-0
lines changed
Expand file tree Collapse file tree 1 file changed +74
-0
lines changed Original file line number Diff line number Diff line change 1+ <#
2+
3+ MakeCab via COM
4+ Author: Alexander Rymdeko-Harvey (@Killswitch-GUI)
5+ License: BSD 3-Clause
6+ Required Dependencies: None
7+ Optional Dependencies: None
8+
9+ #>
10+
11+ function Invoke-MakeCab {
12+ <#
13+ .SYNOPSIS
14+
15+ MakeCab via COM
16+ Author: Alexander Rymdeko-Harvey (@Killswitch-GUI)
17+ License: BSD 3-Clause
18+ Required Dependencies: None
19+ Optional Dependencies: None
20+
21+ .DESCRIPTION
22+
23+ Invoke makecab creation via COM object. Takes a file path and CABs all files in that directory
24+ Its suggested that you make a DIR just for your staged data.
25+
26+ Refrence: https://technet.microsoft.com/en-us/library/2009.04.heyscriptingguy.aspx
27+
28+ .PARAMETER Source
29+
30+ IP Address or Hostname of the remote system
31+
32+ .PARAMETER Destination
33+
34+ Specifies the desired type of execution
35+
36+
37+ .EXAMPLE
38+
39+ Import-Module .\Invoke-DCOM.ps1
40+ Invoke-DCOM -ComputerName '192.168.2.100' -Method MMC20 -Command "calc.exe"
41+ #>
42+
43+ [CmdletBinding()]
44+ Param (
45+ [Parameter(Mandatory = $true, Position = 0)]
46+ [String]
47+ $Source,
48+
49+ [Parameter(Mandatory = $true, Position = 1)]
50+ [string]
51+ $Destination
52+ )
53+
54+ Begin {
55+ Write-Verbose "[*] Source path name being used: $Source"
56+ Write-Verbose "[*] Destination path being used: $Destination"
57+ # obtain com object
58+ $makecab = "makecab.makecab"
59+ $cab = New-Object -ComObject $makecab
60+ }
61+
62+
63+ Process {
64+
65+ #Begin main process block
66+ }
67+
68+ End {
69+
70+ Write-Output "Completed"
71+ }
72+
73+
74+ }
You can’t perform that action at this time.
0 commit comments