Advertisement
Guest User

Untitled

a guest
Sep 27th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  2. # >>>>>> Path credentials
  3. # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  4.  
  5. # Set the physical path credentials of the web application (on Basic Settings screen) to Connect As...
  6. $filter="/system.applicationHost/sites/site[@name='{0}' and @id='1']/application[@path='/{1}']/VirtualDirectory[@path='/']" -f $script:WebSiteName,$appName
  7. Set-WebConfiguration $filter -Value @{userName="$physicalPathCredentialUserID";password="$physicalPathCredentialPassword"}
  8.  
  9. $filter="/system.applicationHost/sites/site[@name='{0}' and @id='1']/application[@path='/{1}']/VirtualDirectory[@path='/']" -f $script:WebSiteName,$appName
  10. Set-WebConfiguration $filter machine/webroot/appHost -metadata overrideMode -value Allow
  11.  
  12. Set-WebConfiguration -Metadata OverrideMode -Value Allow -Filter //windowsAuthentication
  13. Set-WebConfigurationProperty -PSPath IIS:Sites$WebsiteName$AppName -Filter //windowsAuthentication -Name Enabled -Value $true
  14.  
  15. <location path="" overrideMode="Allow">
  16. <system.webServer>
  17. <security>
  18. <authentication>
  19. <windowsAuthentication>
  20. </windowsAuthentication>
  21. </authentication>
  22. </security>
  23. </system.webServer>
  24. </location>
  25.  
  26. <authentication>
  27. <windowsAuthentication enabled="true" />
  28. </authentication>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement