Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Install CRM using Powershell

$
0
0

Hello All,

I have written a script for CRM installation, however when I run below line of code it completes the execution without any error but the problem  here is, its not starting installation wizard for CRM setupserver.exe and there is no process running under task manager.

 

$credential = New-Object System.Management.Automation.PSCredential($username,$password) 

Enter-PSSession –ComputerName $serverName -Credential $credential

Write-Host "Remote Login Completed"

 # Mount CSV File

if ( (Test-Path $ISOServerPath) -eq $false )

{

Invoke-Command -Computername $serverName -ScriptBlock { Mount-DiskImage -ImagePath $($args[0]) }  -argumentlist $setupPath

}

Write-Host "Image mounted"

 # Start CRM Installation

Write-Host "Installation started"

Invoke-Command -Computername $serverName -ScriptBlock { Start-process $($args[0]) -argumentlist "/QR", "/config", $($args[1])} -argumentlist $setupEXE,$CRMInstallationConfig

Write-Host "Installation completed"

 

Output:

PS C:\Install_Kits\Powershell_Scripts> .\CRMInstallation.ps1

\\KNV-CRW-T0010.presystems.private\E:\Server\amd64\SetupServer.exe

WinRM is already set up to receive requests on this computer.

WinRM is already set up for remote management on this computer.

Remote Login Completed

Image mounted

Installation started

Installation completed

 

Could anyone please guide me here, am I missing anything in the syntax?

I tried installing the CRM directly from Command Prompt and it worked perfectly, now I am merging all my logic into single powershell script to install it remotely.

Regards,
Rahul


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>