Hello,
I am trying to automate using powershell and I am running into a dead end. I have 3 components to my solution.
1. welcome.php - calls the powershell script.
2. Input.html. - user submits a file name.
3. IIS.ps1 - powershell script to create IIS directories, and virtual apps.
I am able to run the script fine in powershell ISE but when I call it from my php page it fails. My php page is simple, see below.
The power shell script I am using is listed below.
Set-StrictMode -Version 2.0
$Site="Default Web Site"
Write-Host ""
Write-Host " " -BackgroundColor DarkCyan
Write-Host " IIS Setup Script " -BackgroundColor DarkCyan
Write-Host " Create Virtual Directories " -BackgroundColor DarkCyan
Write-Host " " -BackgroundColor DarkCyan
Write-Host ""
Import-Module WebAdministration -ErrorAction SilentlyContinue
if (dir IIS:\Sites\$Site) {Write-Host...