{"id":17922002,"url":"https://github.com/ivandeex/sharepoint-vm","last_synced_at":"2026-05-02T23:32:57.216Z","repository":{"id":144352735,"uuid":"334136012","full_name":"ivandeex/sharepoint-vm","owner":"ivandeex","description":"Sharepoint virtual machines in AWS and Vultr","archived":false,"fork":false,"pushed_at":"2021-02-25T09:25:09.000Z","size":51,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-01T07:36:08.401Z","etag":null,"topics":["aws","sharepoint","terraform","vultr"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivandeex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-29T12:17:13.000Z","updated_at":"2024-08-21T20:33:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"8158d61a-256a-4561-9816-8add9ce1f3b7","html_url":"https://github.com/ivandeex/sharepoint-vm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ivandeex/sharepoint-vm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivandeex%2Fsharepoint-vm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivandeex%2Fsharepoint-vm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivandeex%2Fsharepoint-vm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivandeex%2Fsharepoint-vm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivandeex","download_url":"https://codeload.github.com/ivandeex/sharepoint-vm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivandeex%2Fsharepoint-vm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274671956,"owners_count":25328546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","sharepoint","terraform","vultr"],"created_at":"2024-10-28T20:37:07.473Z","updated_at":"2025-10-20T07:31:38.400Z","avatar_url":"https://github.com/ivandeex.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sharepoint Virtual Machines\n\nThis is a [terraform](https://terraform.io/) scenario that automates the deployment\nof [SharePoint](https://www.microsoft.com/en-us/microsoft-365/sharepoint/collaboration)\non your [AWS](https://aws.amazon.com/ec2/) or [Vultr](https://www.vultr.com/) VPS.\n\nIt creates the entire stack based on _Windows Server 2012 R2_, including:\n- Active Directory Domain Controller (abbreviated as **ADDC**)\n- Microsoft SQL Server 2014 (**MSQL**)\n- SharePoint Application Server with example sites (**SPAP**)\n- Linux machine with Golang 1.14 for tests\n- Private network connecting all boxes\n\n## Creating your servers\n\nInstall _terraform_ from the [download page](https://www.terraform.io/downloads.html).\n\nObtain your Vultr API key from the settings page https://my.vultr.com/settings/#settingsapi\nand set the environment variable `VULTR_API_KEY`.\n\nIf you want to use AWS (unfortunately this script currently fails on AWS),\nset AWS keys in environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.\n\nClone this repository locally:\n```\ngit clone https://github.com/ivandeex/sharepoint-vm\ncd sharepoint-vm\n```\n\nCreate a text file `terraform.tfvars` (in the `vultr` or `aws` directory)\nif you want to tune some parameters, e.g.:\n```\nadmin_password = \"Secret2021!\"\naws_region = \"us-east-1\"\ndropbox_url = \"https://www.dropbox.com/sh/aaoj8l0my90gblo/AADlQ7sVmu4uLHxKH-Nl6jYRa\"\n```\n\nPlease note that password should obey default Windows requirements:\nhave at least 8 characters, upper and lower case, digits and punctuation.\nOtherwise installation will fail.\n\nNow change to subdirectory `vultr` (or `aws`) and run the script:\n```\ncd sharepoint-vm/vultr\nterraform init\nterraform plan\nterraform apply\n```\n\nWait about 1-2 hours for setup to complete...\n\nAt the end the script will print IP addresses and names of created servers.\n\n## Custom domain\n\nBy default the Active Directory domain is private `example.com`.\nIf you have a domain registered on [Cloudflare](https://www.cloudflare.com/),\nobtain your Cloudflare token from the profile page https://dash.cloudflare.com/profile/api-tokens\nand set environment variables `CLOUDFLARE_EMAIL` and `CLOUDFLARE_TOKEN`\n(or `CLOUDFLARE_API_KEY`), then add the name of the DNS zone in `terraform.tfvars`:\n```\ndomain_name = \"mycloudflaredomain.com\"\n```\n\n## Using your servers\n\nYou can connect to the Windows boxes using any RDP client.\nUse public IP address from the script output, username _Administrator_\n(or _spAdmin_) and password from settings.\nIf you configured a Cloudflare domain name, you can use hostnames\nlike `sptest-spap.yourdomain.com` instead of IP address.\n\nUse the following command to login to the test linux box:\n```\ncd sharepoint-vm/unix\nchmod 600 vagrant.key\nssh -i vagrant.key -l ubuntu -p 22 IP.OF.LINUX.BOX\n```\n\nThe IP address was printed at the end of terraform run\n(or use DNS name `sptest-unix.yourdomain.com`).\n\n## Caveats\n\nSome installation steps are not 100% reliable, Welcome to Windows...\nFor example, the _6-install_ step sometimes fails with error\n[1603](https://docs.microsoft.com/en-us/windows/win32/msi/error-codes).\nThe script retries many such situations.\nIf however it failed for you, don't worry.\nJust repeat the `terraform apply` command until the problem goes.\nThis will help in most cases.\n\nA copy of prerequisite downloads for this script was saved in\n[Dropbox](https://www.dropbox.com/sh/aaoj8l0my90gblo/AADlQ7sVmu4uLHxKH-Nl6jYRa?dl=0).\nThis should help in case Microsoft decides to deprecate some of them.\n\nCurrently installation of Sharepoint Server on AWS stops at the prerequisites stage.\nProbably, _wsman_ connection breaks due to high CPU usage caused by .NET optimization service.\nFor now you can use Vultr until I have time to fix that.\n\n## HTTPS and SSL\n\nThis script configures a vanilla Sharepoint site with pure HTTP access for tests.\nIf you need `HTTPs`, you can update the site with a self-signed SSL certificate manually.\n\nThe certificate is already created by the script and named `spap.example.com`.\nIt is already added to the Windows certificate store on the Sharepoint machine,\njust add it to the test site as follows:\n- Open IIS manager `Start \u003e All Apps \u003e Internet Information Services (IIS) Manager`\n  (ignore _Manager 6.0_)\n- Expand `Sites` and select your _test web application_ from the navigation tree\n- Click on the `Bindings` link from the right hand panel\n- Click `Add...` in the Bindings dialog\n- In the `Add Site Binding` dialog, select HTTPS from the `Type` drop down\n- Leave the IP address as `All Unassigned`, the Port should say 443\n- Enter the `Host name` as `spap.example.com`\n- Select the `spap.example.com` SSL certificate from the drop-down menu and click OK\n\nConfigure alternate HTTPS access mapping for the site:\n- Open the Sharepoint 2016 `Central Administration` tool from Windows start menu\n  or open site `http://spap:2016/` in Internet Explorer\n- Click on `Application Management \u003e Configure alternate access mappings`\n- Click on `Edit Public URLs` and pick your _Test Web Application_\n- Enter the HTTPs URL `https://spap.example.com` in the `Intranet` (and optionally `Internet`) zone\n\nTell Windows to trust the site certificate without confirmation:\n- Open `Control Panel \u003e Internet Options \u003e Content \u003e Certificates \u003e Intermediate Certificate Authorities`\n- Select your SSL certificate `spap.example.com` and click `Export`\n- Export it as `DER encoded binary` to the desktop.\n  Choose any name you like, for example `self-signed.cer`\n- Switch certificate store window to the `Trusted Root Certificate Authorities` tab\n- Import the certificate, confirm\n\nOpen new _HTTPs_ address `https://spap.example.com/sites/test` with Internet Explorer.\nAfter you enter your password credendials for `example\\spAdmin`, Sharepoint\nwill re-create the initial content from templates and do the warm-up.\nThis should be done only once.\n\nNow you can mount the site document library as a network disk:\n- Open Windows explorer and point to `This PC`\n- Click `Computer \u003e Map Network Drive` in the menu\n- Type `https://spap.example.com/sites/test/Shared%20Documents`\n  in the `Folder` field and click OK\n- Enter your credentials when prompted\n\nIf you want to access the site from the Linux test box, you will have to\nmake Ubuntu trust the self-signed certificate.\nCopy it from Windows to Ubuntu, convert from the CER/DER format to PEM/CRT\nand make it trusted as follows:\n```\nopenssl x509 -in self-signed.cer -inform der -out self-signed.crt\nsudo cp self-signed.crt /usr/local/share/ca-certificates/\nsudo update-ca-certificates\n```\n\nNow the following command should work without SSL errors,\nhowever it can require NTLM authorization:\n```\ncurl -v -4 --ntlm --negotiate -u spadmin:YOURPASS https://spap.example.com/sites/test/Shared%20Documents\n```\n\n## References\n\n- Installing Sharepoint with Powershell:\n  - http://www.luisevalencia.com/2016/09/25/installing-sharepoint-server-2016-with-powershell/\n- Example of Sharepoint install using Terraform:\n  - https://github.com/eschu21/terraform_sharepoint_automation\n- How to set up Active Directory:\n  - https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/deploy/install-active-directory-domain-services--level-100-\n  - https://theitbros.com/unable-to-find-a-default-server-with-active-directory-web-services-running/\n  - https://docs.microsoft.com/en-us/archive/blogs/adpowershell/disable-loading-the-default-drive-ad-during-import-module\n- Why New-SPConfigurationDatabase fails with _RPC Server Unavailable_:\n  - https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/new-spconfigurationdatabase?view=sharepoint-ps\n  - https://www.sharepointdiary.com/2016/09/failed-to-create-the-configuration-database-the-rpc-server-is-unavailable.html\n  - https://www.spguides.com/the-rpc-server-is-unavailable-sharepoint-2016/\n  - http://www.harbar.net/archive/2018/06/25/RPC-Server-Unavailable-when-creating-a-SharePoint-Farmhellip-the-curse.aspx\n- How to prioritize network adapters in Windows:\n  - https://social.technet.microsoft.com/Forums/en-US/cb8dac7f-5f04-42b1-8065-a95c946f6ec2/change-network-adapter-priority-order\n- How to query Active Directory users using Powershell:\n  - http://woshub.com/get-aduser-getting-active-directory-users-data-via-powershell/\n- How to run SQL Server commands from Powershell:\n  - https://stackoverflow.com/questions/9714054/how-to-execute-sqlcmd-from-powershell\n- Creating a Sharepoint site:\n  - https://docs.microsoft.com/en-us/SharePoint/sites/create-a-site-collection?redirectedfrom=MSDN#create-a-site-collection-by-using-microsoft-powershell\n  - http://tomkupka.com/sharepoint/create-web-application-and-site-collection-in-sharepoint-2016-using-powershell/\n- How to change a Sharepoint web application from HTTP to HTTPS:\n  - https://www.sharepointdiary.com/2012/03/configuring-ssl-certificates-in-sharepoint-2010.html\n  - https://www.sharepointdiary.com/2017/08/how-to-change-sharepoint-web-application-from-http-to-https.html\n  - https://stackoverflow.com/questions/15697157/using-curl-with-ntlm-auth-to-make-a-post-is-failing\n- How to map Sharepoint network drives using Powershell:\n  - https://stackoverflow.com/questions/30298850/powershell-map-persistent-sharepoint-path\n- List of Amazon EC2 AMIs:\n  - https://eu-central-1.console.aws.amazon.com/ec2/v2/home?region=eu-central-1#Images:visibility=public-images%3Bsort=name\n  - https://cloud-images.ubuntu.com/locator/ec2/\n  - https://awsregion.info/\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivandeex%2Fsharepoint-vm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivandeex%2Fsharepoint-vm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivandeex%2Fsharepoint-vm/lists"}