Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active January 27, 2021 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/620c8d2966d23d186943656e80971e9d to your computer and use it in GitHub Desktop.
Save bjoerntx/620c8d2966d23d186943656e80971e9d to your computer and use it in GitHub Desktop.
# Unzip the application to "C:\DocumentServices"
Expand-Archive -Path DS-0100-XB.zip -DestinationPath C:\DocumentServices
# Install IIS
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServer
Enable-WindowsOptionalFeature -Online -FeatureName IIS-CommonHttpFeatures
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebSockets
# Download and install Visual C++ Redistributable Packages for Visual Studio 2013
Invoke-WebRequest -OutFile vc_redist.x64.exe https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe
Start-Process "vc_redist.x64.exe" -ArgumentList "/passive" -wait -Passthru
del vc_redist.x64.exe
# Download and install Visual C++ Redistributable Packages for Visual Studio 2015
Invoke-WebRequest -OutFile vc_redist.x64.exe https://download.microsoft.com/download/6/A/A/6AA4EDFF-645B-48C5-81CC-ED5963AEAD48/vc_redist.x64.exe
Start-Process "vc_redist.x64.exe" -ArgumentList "/passive" -wait -Passthru
del vc_redist.x64.exe
# Install ASP.NET Core Runtime
# Checksum and direct link from: https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-aspnetcore-3.1.11-windows-hosting-bundle-installer
Invoke-WebRequest -OutFile dotnet-hosting-3.1.11-win.exe https://download.visualstudio.microsoft.com/download/pr/d8b046b7-c812-4200-905d-d2e0242be9d5/53d5698d79013be0232152ae1b43c86b/dotnet-hosting-3.1.11-win.exe
Start-Process "dotnet-hosting-3.1.11-win.exe" -ArgumentList "/passive" -wait -Passthru
Remove-Item -Force dotnet-hosting-3.1.11-win.exe
# Create a new IIS ApplicationPool
$appPoolName = 'DSServer'
New-WebAppPool $appPoolName
Import-Module WebAdministration
$appPool = Get-Item IIS:\AppPools\$appPoolName
$appPool.managedRuntimeVersion = ''
$appPool | set-item
$appPoolName = 'DSServer'
$appName = 'DocumentServices'
New-WebApplication -Name $appName -Site 'Default Web Site' -PhysicalPath C:\DocumentServices -ApplicationPool $appPoolName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment