I am trying to allow my users to check if they have ActiveSync enabled for email and if they do return you are good to go, else tell them they need to complete a form. So a simple test I setup tried to start with a powershell.asp page containing:
Then the resulting doPowershell.asp page I have for testing:
the activesync.ps1 file contains
On the screen it outputs the value the user entered and then outputs the content of the ps1 file. Doesn't physically run anything. Thoughts?
Note: The current form doesn't really effect the PowerShell script. Just a shell I wrote to see if I could run it. The PS1 right now is just hardcoded with a physical username.
Copy Code
<form action="doPowershell.asp" method="post"> Network Username: <input type="textbox" name="userName"/><input type="submit"/></form>
Then the resulting doPowershell.asp page I have for testing:
Copy Code
<% Dim userName userName = Request.Form("userName") response.write(userName) Server.Execute("activesync.ps1")%>
the activesync.ps1 file contains
Copy Code
(Get-CASMailbox -Identity <username>).ActiveSyncEnabled
On the screen it outputs the value the user entered and then outputs the content of the ps1 file. Doesn't physically run anything. Thoughts?
Note: The current form doesn't really effect the PowerShell script. Just a shell I wrote to see if I could run it. The PS1 right now is just hardcoded with a physical username.