When we want to install Sitecore with Sitecore Install Framework there, a few requirements must be met.
In Powershell, there is an easy way to achieve this goal.
The #Requires statement prevents a script from running unless the Windows PowerShell version, modules,
and rights prerequisites are met. If the requirements are not met, Windows PowerShell does not run the script.
More details about available options you can find in documentation.
In case of Sitecore Install Framework, we shall run the install script:
Below is a code snippet to check all requirements:
#requires -RunAsAdministrator #requires -Version 5.1 #requires -module SitecoreInstallFramework #requires -module SitecoreInstallExtensions
The last check that you should consider if you don't want to have trouble is to verify PowerShell ISE version.
The expected is the x64 version of Powershell ISE, not x86
If(![Environment]::Is64BitProcess) { Write-Warning "Please run 64-bit PowerShell" return }