Skip to content

Commit

Permalink
Fixed problem with spaces in exe path
Browse files Browse the repository at this point in the history
Added README file with project description
Updated module version
  • Loading branch information
alan-null committed Nov 18, 2017
1 parent be78dfd commit 8578c67
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,38 @@
# WebPI Power Shell

**WebPI Power Shell** is a wrapper for **WebPICMD.exe** written in PowerShell and shipped as Powershell Module

**WebPICMD.exe**([WebPI Command line](https://docs.microsoft.com/en-us/iis/install/web-platform-installer/web-platform-installer-v4-command-line-webpicmdexe-rtw-release#using-webpicmdexe)) is a command line tool for managing **Web Platform Installer**

The **Microsoft Web Platform Installer (Web PI)** is a free tool that makes getting the latest components of the Microsoft Web Platform, including Internet Information Services (IIS), SQL Server Express, .NET Framework and Visual Web Developer easy


# Installation
Module is available on [Powershell Gallery](https://www.powershellgallery.com/packages/WebPI.PS/)

### Inspect
```powershell
PS> Save-Module -Name WebPI.PS -Path <path>
```
### Install
```powershell
PS> Install-Module -Name WebPI.PS
```

# Usage

```powershell
PS> Import-Module WebPI.PS
PS> Invoke-WebPI /Install /Products:UrlRewrite2
```

**Limitations**

Due to the fact how PS split parameter if there is a comma in it, use double quote so whole string will be treated as a single param.

```diff
- BAD
- Invoke-WebPI /Install /Products:UrlRewrite2,WDeploy36
+ GOOD
+ Invoke-WebPI /Install "/Products:UrlRewrite2,WDeploy36"
```
2 changes: 1 addition & 1 deletion WebPI.PS.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
RootModule = 'WebPI.PS.psm1'

# Version number of this module.
ModuleVersion = '1.0.1'
ModuleVersion = '1.1.0'

# ID used to uniquely identify this module
GUID = 'add2ca98-860b-4313-9ad1-9ef90884e6ca'
Expand Down
5 changes: 2 additions & 3 deletions WebPI.PS.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ function Get-CurrentModulePath () {

function Invoke-WebPI () {
$CurrentModulePath = Get-CurrentModulePath
$arguments = $args -join ' '
$CurrentModulePath = $CurrentModulePath.Replace(" ", "^ ")
cmd /c "$CurrentModulePath\webpi\WebpiCmd.exe $arguments"
$arguments = $args | % { $_}
& "$CurrentModulePath\webpi\WebpiCmd.exe" $arguments
}

$exportModuleMemberParams = @{
Expand Down

0 comments on commit 8578c67

Please sign in to comment.