A module to ease infrastructure as code tasks for Dynamics 365.
Install-Module -Name Dynamics365Configuration
$Dynamics365Resources
Downloads the file resource and extracts into the folder. Requires elevation.
Save-Dynamics365Resource
[[-Resource] <Dynamics365ResoucreName>]
[[-TargetDirectory] <string>]
The resource for downloading, possible values are [Dynamics365Server90RTM<Language>,VisualCPlusPlusRuntime,VisualCPlusPlus2010Runtime,SQLNCli2012SP4,SQLSysClrTypes2016,SharedManagementObjects2016,MSODBCSQL,Dynamics365Server90LanguagePack<Language>,CRM2016RTM<Language>,SQLNCli2018R2,SQLSysClrTypes2012,SharedManagementObjects2012,ReportViewer2012,CRM2016LanguagePack<Language>,CRM2016Update01<Language>,CRM2016ServicePack1<Language>,CRM2016ServicePack1Update01<Language>,CRM2016ServicePack2<Language>,CRM2016ServicePack2Update01<Language>,CRM2016ServicePack2Update02<Language>,CRM2016ReportingExtensionsServicePack2Update03<Language>,CRM2016ReportingExtensionsUpdate01<Language>,CRM2016ReportingExtensionsServicePack1<Language>,CRM2016ReportingExtensionsServicePack1Update01<Language>,CRM2016ReportingExtensionsServicePack2<Language>,CRM2016ReportingExtensionsServicePack2Update01<Language>,CRM2016ReportingExtensionsServicePack2Update02<Language>,CRM2016ReportingExtensionsServicePack2Update03<Language>]
The directory path where the files or directories will be saved.
Loading all known resources to the current directory:
Save-Dynamics365Resource
Loading CRM2016ServicePack2Update02Enu to current directory:
Save-Dynamics365Resource -Resource CRM2016ServicePack2Update02Enu
Loading all known resources to the specified directory:
Save-Dynamics365Resource -TargetDirectory c:\DynamicsResources
Loading CRM2016LanguagePackRus to the specified directory:
Save-Dynamics365Resource -Resource CRM2016LanguagePackRus c:\DynamicsResources\CRM2016LanguagePackRus
Installs one specified or all the software prerequisites.
Install-Dynamics365Prerequisite
[-Prerequisite <Dymanics365PrerequisiteName>]
[-DynamicsPrerequisiteFilePath <string>]
Specifies if only particular prerequisite must be installed. If $null is specified, all prerequisites are installed. For Dynamics 365 9.0 possible values are [SQLNCli2012SP4,SQLSysClrTypes2016,SharedManagementObjects2016,MSODBCSQL]. For CRM 2016 possible values are [SQLNCli2018R2,SQLSysClrTypes2012,SharedManagementObjects2012,ReportViewer2012].
Specifies where the file or files are located.
Installing all Dynamics 365 prerequisites. If any prerequisite is not found in the current directory, installing from the Internet:
Install-Dynamics365Prerequisite
Installing specific prerequisite. If prerequisite is not found in the current directory, installing from the Internet:
Install-Dynamics365Prerequisite -Prerequisite SQLNCli2012SP4
Installing all prerequisites from the predownloaded files. If prerequisite is not found in the current directory, installing from the Internet:
Install-Dynamics365Prerequisite -DynamicsPrerequisiteFilePath C:\Install\Dynamics
Installing specific prerequisite from the predownloaded file. If prerequisite is not found in the current directory, installing from the Internet:
Install-Dynamics365Prerequisite -Prerequisite SQLNCli2012SP4 -DynamicsPrerequisiteFilePath C:\Install\Dynamics
or
Install-Dynamics365Prerequisite -Prerequisite SQLNCli2012SP4 -DynamicsPrerequisiteFilePath C:\Install\Dynamics\SQLNCli2012SP4
or
Install-Dynamics365Prerequisite -Prerequisite SQLNCli2012SP4 -DynamicsPrerequisiteFilePath C:\Install\Dynamics\SQLNCli2012SP4\sqlncli.msi
Installs Dynamics 365 Server with new or existing organization.
Install-Dynamics365Server
-MediaDir <string>
-LicenseKey <string>
[-CreateDatabase <switch>]
-SqlServer <string>
-PrivUserGroup <string>
-SQLAccessGroup <string>
-UserGroup <string>
-ReportingGroup <string>
-PrivReportingGroup <string>
-CrmServiceAccount <pscredential>
-DeploymentServiceAccount <pscredential>
-SandboxServiceAccount <pscredential>
-VSSWriterServiceAccount <pscredential>
-AsyncServiceAccount <pscredential>
-MonitoringServiceAccount <pscredential>
[-CreateWebSite <switch>]
-WebSitePort <int>
-WebSiteUrl <string>
[-IncomingExchangeServer <string>]
-Organization <string>
-OrganizationUniqueName <string>
-ReportingUrl <string>
[-InstallDir <string>]
[-BaseISOCurrencyCode <string>]
[-BaseCurrencyName <string>]
[-BaseCurrencySymbol <string>]
[-BaseCurrencyPrecision <int>]
[-OrganizationCollation <string>]
[-SQM <switch>]
[-MUOptin <switch>]
[-Reboot <switch>]
[-InstallAccount <pscredential>]
Have a look at Microsoft Dynamics 365 Server documentation: https://technet.microsoft.com/en-us/library/hh699830.aspx.
Specifies the location of the Dynamics 365 RTM installation files.
See <LicenseKey>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <InstallDir>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <Database>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <SqlServer>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <PrivUserGroup>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <SQLAccessGroup>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <UserGroup>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <ReportingGroup>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <PrivReportingGroup>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <CrmServiceAccount>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <DeploymentServiceAccount>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <SandboxServiceAccount>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <VSSWriterServiceAccount>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <VSSWriterServiceAccount>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <VSSWriterServiceAccount>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <WebsiteUrl>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <WebsiteUrl>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <WebsiteUrl>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <Email>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <Organization>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <OrganizationUniqueName>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <basecurrency>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <basecurrency>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <basecurrency>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <basecurrency>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <OrganizationCollation>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <Reporting>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <SQM>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <muoptin>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
See <Reboot>
XML node description in https://technet.microsoft.com/en-us/library/hh699830.aspx.
An account that has permissions to install the software and create a database. If not specified, the current account is used. If specified, CredSSP must be configured for invoking scripts locally on the machine with altered credential.
Installation log file path. By default, installation process generates time-stamped log file path unless LogFilePath
parameter is set.
Interval in seconds to be used during installation process updates. By default, installation process updates output every 30 seconds.
Switch to pull installation logs into the output every LogFilePullIntervalInSeconds
seconds. By default, installation process updates output without detailed installation logs. This option makes installation pull newest logs from LogFilePath
file and push them into output every LogFilePullIntervalInSeconds
seconds.
Use this option to get a details feedback on the installation process.
$securedPassword = ConvertTo-SecureString "c0mp1Expa~~" -AsPlainText -Force
$CRMInstallAccountCredential = New-Object System.Management.Automation.PSCredential( "contoso\_crmadmin", $securedPassword );
$CRMServiceAccountCredential = New-Object System.Management.Automation.PSCredential( "contoso\_crmsrv", $securedPassword );
$DeploymentServiceAccountCredential = New-Object System.Management.Automation.PSCredential( "contoso\_crmdplsrv", $securedPassword );
$SandboxServiceAccountCredential = New-Object System.Management.Automation.PSCredential( "contoso\_crmsandbox", $securedPassword );
$VSSWriterServiceAccountCredential = New-Object System.Management.Automation.PSCredential( "contoso\_crmvsswrit", $securedPassword );
$AsyncServiceAccountCredential = New-Object System.Management.Automation.PSCredential( "contoso\_crmasync", $securedPassword );
$MonitoringServiceAccountCredential = New-Object System.Management.Automation.PSCredential( "contoso\_crmmon", $securedPassword );
Save-Dynamics365Resource -Resource Dynamics365Server90RTMEnu -TargetDirectory C:\Install\Dynamics\Dynamics365Server90RTMEnu
Install-Dynamics365Server `
-MediaDir C:\Install\Dynamics\Dynamics365Server90RTMEnu `
-LicenseKey KKNV2-4YYK8-D8HWD-GDRMW-29YTW `
-InstallDir "c:\Program Files\Microsoft Dynamics CRM" `
-CreateDatabase `
-SqlServer $env:COMPUTERNAME\SQLInstance01 `
-PrivUserGroup "CN=CRM01PrivUserGroup,OU=CRM groups,DC=contoso,DC=local" `
-SQLAccessGroup "CN=CRM01SQLAccessGroup,OU=CRM groups,DC=contoso,DC=local" `
-UserGroup "CN=CRM01UserGroup,OU=CRM groups,DC=contoso,DC=local" `
-ReportingGroup "CN=CRM01ReportingGroup,OU=CRM groups,DC=contoso,DC=local" `
-PrivReportingGroup "CN=CRM01PrivReportingGroup,OU=CRM groups,DC=contoso,DC=local" `
-CrmServiceAccount $CRMServiceAccountCredential `
-DeploymentServiceAccount $DeploymentServiceAccountCredential `
-SandboxServiceAccount $SandboxServiceAccountCredential `
-VSSWriterServiceAccount $VSSWriterServiceAccountCredential `
-AsyncServiceAccount $AsyncServiceAccountCredential `
-MonitoringServiceAccount $MonitoringServiceAccountCredential `
-CreateWebSite `
-WebSitePort 5555 `
-WebSiteUrl https://$env:COMPUTERNAME.contoso.local `
-Organization "Contoso Ltd." `
-OrganizationUniqueName Contoso `
-BaseISOCurrencyCode USD `
-BaseCurrencyName "US Dollar" `
-BaseCurrencySymbol `$ `
-BaseCurrencyPrecision 2 `
-OrganizationCollation Latin1_General_CI_AI `
-ReportingUrl http://$env:COMPUTERNAME/ReportServer_RSInstance01 `
-InstallAccount $CRMInstallAccountCredential
Installs Dynamics 365 Reporting Extensions.
Install-Dynamics365Server
-MediaDir <string>
-InstanceName <string>
[-ConfigDBServer <string>]
[-InstallAccount <pscredential>]
[-MUOptin <switch>]
Specifies the location of the Dynamics 365 RTM installation files. Remote installation requires "WMI-WINMGMT-In-TCP" and "WMI-RPCSS-In-TCP" firewall rules enabled on the target machine to be able to control software installed.
See <instancename>
XML node description in http://157.56.148.23/en-us/library/hh699826.aspx and http://157.56.148.23/en-us/library/hh699684.aspx.
See <configdbserver>
XML node description in http://157.56.148.23/en-us/library/hh699826.aspx and http://157.56.148.23/en-us/library/hh699684.aspx.
An account that has permissions to install the software and create a database. If not specified, the current account is used. If specified, CredSSP must be configured for invoking scripts locally on the machine with altered credential.
See <muoptin>
XML node description in http://157.56.148.23/en-us/library/hh699826.aspx and http://157.56.148.23/en-us/library/hh699684.aspx.
Install-Dynamics365ReportingExtensions `
-MediaDir C:\Install\Dynamics\Dynamics365Server90RTMEnu\SrsDataConnector `
-InstanceName SQLInstance01
Installs the software locally.
$securedPassword = ConvertTo-SecureString "c0mp1Expa~~" -AsPlainText -Force
$CRMInstallAccountCredential = New-Object System.Management.Automation.PSCredential( "contoso\_crmadmin", $securedPassword );
Install-Dynamics365ReportingExtensions `
-MediaDir \\$env:COMPUTERNAME\c$\Install\Dynamics\Dynamics365Server90RTMEnu\SrsDataConnector `
-ConfigDBServer $dbHostName `
-InstanceName SQLInstance01 `
-InstallAccount $CRMInstallAccountCredential
Installs Reporting Extensions on the remote SQL machine.
Installs Dynamics 365 Server update.
Install-Dynamics365Update
[-MediaDir] <string>
[-InstallAccount <pscredential>]
Specifies the location of the Dynamics 365 Server update installation files.
An account that has permissions to install the software and update the database. If not specified, the current account is used. If specified, CredSSP must be configured for invoking scripts locally on the machine with altered credential.
$securedPassword = ConvertTo-SecureString "c0mp1Expa~~" -AsPlainText -Force
$CRMInstallAccountCredential = New-Object System.Management.Automation.PSCredential( "contoso\_crmadmin", $securedPassword );
Save-Dynamics365Resource -Resource CRM2016ServicePack2Update02 -TargetDirectory C:\Install\Dynamics\CRM2016ServicePack2Update02
Install-Dynamics365Update -MediaDir C:\Install\Dynamics\CRM2016ServicePack2Update02 -InstallAccount $CRMInstallAccountCredential
Installs Dynamics 365 language pack. This command does not activate language pack in CRM organization, only installs it.
Install-Dynamics365Language
[-MediaDir] <string>
Specifies the location of the Dynamics 365 language pack installation files.
Save-Dynamics365Resource -Resource Dynamics365Server90LanguagePackSve -TargetDirectory C:\Install\Dynamics\Dynamics365Server90LanguagePackSve
Install-Dynamics365Language -MediaDir C:\Install\Dynamics\Dynamics365Server90LanguagePackSve