Tuesday, May 26, 2015

PowerShell Web Access with Active Directory Cmdlet

Hi,

Today, I will talk about configuring your PowerShell Web Access to work with Active Directory cmdlet.

First of all, I want to thank's tommymaynard who help me with that. You can see my question here from powershell.org.

Procedure

  1. I assumed you have PSWA installed and configured. Mine, is on Windows 2012 R2 STD Core dedicated for that.
  2. Install the AD PowerShell Tools on the server if it's not installed : Add-WindowsFeature RSAT-AD-PowerShell
  3. At this point, if you tried to run AD Cmdlet from PSWA this will failed.
  4. Create a configuration file store on your PSWA server : New-PSSessionConfigurationFile -Path C:\yourpath\filename.pssc
  5. You need to register the files and put the good credential to elevate the session : Register-PSSessionConfiguration -Name filename.pssc -RunAsCredential yourdomain\administrator
  6. You will ask for the credential for the user, enter it. Accept all change told by PS.
  7. You can test the config from a PS Console on YOUR computer : Enter-PSSession -ComputerName servername -ConfigurationName filename.pssc
  8. Tried : Get-ADUser yourusername
  9. After you validate it's worked, you need to create a new PSWA Authorization Rule : Add-PswaAuthorizationRule -UserName yourdomain\administrator -ComputerName yourserver -ConfigurationName yourfilename.pssc
  10. Go on the PSWA console login page, enter your User Name, Password, Computer Name and click on Optional connection settings.
  11. In Configuration Name, type the name of it. Its yourname.pssc
  12. Test like step 8.
I hope that will help you. I want to thank's again tommymaynard from powershell.org.
If you have any comments or questions, feel free to do it.

Have a good day !

No comments:

Post a Comment