This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
PS newbie trying to set up a VPN that has a script I need to run to create the installer. It keeps hanging up on a section that has a zip cmdlet that obviously does not exist. Any help would be appreciated.
C:\temp([Parameter(Mandatory=$true)][string] $client_iso)
$MountResult = Mount-DiskImage -ImagePath $client_iso -PassThru $mountdrive = ($MountResult | Get-Volume).DriveLetter
$tempDirectoryBase = [System.IO.Path]::GetTempPath(); Do { $newTempDirPath = [String]::Empty; [string] $name = [System.Guid]::NewGuid(); $newTempDirPath = (Join-Path $tempDirectoryBase $name); } While (Test-Path $newTempDirPath);
New-Item -ItemType Directory -Path $newTempDirPath;
$setupConfig = @" <?xml version="1.0" encoding="UTF-8"?> <CLIENT_CONFIGURATOR> <SETUP_CONFIGURATION> <PRODUCTNAME>BIG-IP Edge Client (TM) package</PRODUCTNAME> <DATABASE>f5fpclients.msi</DATABASE> <MINIMUM_MSI>150</MINIMUM_MSI> <PROPERTIES>STARTAPPWITHWINDOWS=1</PROPERTIES> <OPERATION>INSTALLUPD</OPERATION> </SETUP_CONFIGURATION> <FEATURES> <FEATURE>MachineTunnelService</FEATURE> <FEATURE>PortRedirector</FEATURE> </FEATURES> <STONEWALL_EXCLUSIONS> </STONEWALL_EXCLUSIONS> </CLIENT_CONFIGURATOR> "@
$setupConfig | Add-Content (-join ($newTempDirPath, "_setupconfiguration.f5c")); Copy-Item -Path (-join ($mountdrive, ":\sam\www\webtop\public\download\f5fpclients.msi")) -Destination (-join ($newTempDirPath, "\f5fpclients.msi")); $F5_VPNPath = (Join-Path $newTempDirPath "F5 VPN"); $amd64Path = (Join-Path $F5_VPNPath "amd64"); $F5_TMPPath = (Join-Path $F5_VPNPath "F5_TMP");
New-Item -ItemType Directory -Path $F5_VPNPath; New-Item -ItemType Directory -Path $amd64Path; New-Item -ItemType Directory -Path $F5_TMPPath;
Copy-Item -Path (-join ($mountdrive, ":\sam\www\webtop\public\download\F5MachineTunnelService.exe")) -Destination (-join ($F5_VPNPath, "\F5MachineTunnelService.exe")); Copy-Item -Path (-join ($mountdrive, ":\sam\www\webtop\public\download\scew_uls.dll")) -Destination (-join ($F5_VPNPath, "\scew_uls.dll")); Copy-Item -Path (-join ($mountdrive, ":\sam\www\webtop\public\download\F5MachineTunnelInfo.exe")) -Destination (-join ($F5_VPNPath, "\F5MachineTunnelInfo.exe")); Copy-Item -Path (-join ($mountdrive, ":\sam\www\webtop\public\download\F5FltSrv.exe")) -Destination (-join ($F5_VPNPath, "\F5FltSrv.exe")); Copy-Item -Path (-join ($mountdrive, ":\sam\www\webtop\public\download\F5FltDrv.sys")) -Destination (-join ($F5_VPNPath, "\F5FltDrv.sys")); Copy-Item -Path (-join ($mountdrive, ":\sam\www\webtop\public\download\F5FltSrvAMD64.exe")) -Destination (-join ($amd64Path, "\F5FltSrv.exe")); Copy-Item -Path (-join ($mountdrive, ":\sam\www\webtop\public\download\F5FltDrvAMD64.sys")) -Destination (-join ($amd64Path, "\F5FltDrv.sys"));
Copy-Item -Path (-join ($mountdrive, ":\sam\www\webtop\public\download\urxvpn.cab")) -Destination (-join ($F5_TMPPath, "\urxvpn.cab"));
Set-Location $newTempDirPath; $pkgPath = (Join-Path $tempDirectoryBase "MachineTunnelsSetup.exe") zip -r (-join ($newTempDirPath, ".zip")) "F5 VPN" setup_configuration.f5c f5fpclients.msi
gc (-join ($mountdrive, ":\sam\www\webtop\public\download\setupstub.exe")),(-join ($newTempDirPath, ".zip")) -Enc Byte -Read 512 | sc $pkgPath -Enc Byte
Subreddit
Post Details
- Posted
- 2 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/PowerShell/...