Uninstall Sitecore Commerce 9.1.0Commerce Server Catalog Manager - 8.2.1Value does not fall within the expected error while Sitecore Experience Commerce installationCommerce store website Items are not visible in the content treeSitecore Commerce Installation error 503 service unavailableIndex name for Sitecore CommerceWebsite names of Sitecore Commerce web applicationsWhat are the certificates associated with websites on installation of Sitecore Experience Commerce 9 Update 2How to get Order using OrderConfirmationId/TrackingNumber in Sitecore Commerce?Installation Error: The remote server returned an error: (424) Method FailureSitecore Commerce Compatibility
How can I make 12 tone and atonal melodies sound interesting?
A word that means "blending into a community too much"
Is it possible for a vehicle to be manufactured without a catalytic converter?
How can one's career as a reviewer be ended?
Why was this person allowed to become Grand Maester?
How can I deal with uncomfortable silence from my partner?
Does Assassinate grant two attacks?
Explain the ending of Black Mirror's "Smithereens"
Is there a DSLR/mirorless camera with minimal options like a classic, simple SLR?
Scientist couple raises alien baby
Is it expected that a reader will skip parts of what you write?
Proving that a Russian cryptographic standard is too structured
Can the removal of a duty-free sales trolley result in a measurable reduction in emissions?
Does putting salt first make it easier for attacker to bruteforce the hash?
Should I refuse being named as co-author of a bad quality paper?
How can I remove material from this wood beam?
Why Does Mama Coco Look Old After Going to the Other World?
With Ubuntu 18.04, how can I have a hot corner that locks the computer?
Are there any normal animals in Pokemon universe?
New bike, tubeless tire will not inflate
Does the new finding on "reversing a quantum jump mid-flight" rule out any interpretations of QM?
Is it possible to fly backward if you have really strong headwind?
Who won a Game of Bar Dice?
Which is the better way to call a method that is only available to one class that implements an interface but not the other one?
Uninstall Sitecore Commerce 9.1.0
Commerce Server Catalog Manager - 8.2.1Value does not fall within the expected error while Sitecore Experience Commerce installationCommerce store website Items are not visible in the content treeSitecore Commerce Installation error 503 service unavailableIndex name for Sitecore CommerceWebsite names of Sitecore Commerce web applicationsWhat are the certificates associated with websites on installation of Sitecore Experience Commerce 9 Update 2How to get Order using OrderConfirmationId/TrackingNumber in Sitecore Commerce?Installation Error: The remote server returned an error: (424) Method FailureSitecore Commerce Compatibility
I have installed Sitecore 9.1.0 XP and Experience Commerce 9.1.0.
Now I am trying to uninstall Sitecore Experience Commerce.
Is there any script to achieve this ? or uninstalling XP also uninstalls Sitecore Experience Commerce?
Thanks in advance for any support.
sitecore-commerce
add a comment |
I have installed Sitecore 9.1.0 XP and Experience Commerce 9.1.0.
Now I am trying to uninstall Sitecore Experience Commerce.
Is there any script to achieve this ? or uninstalling XP also uninstalls Sitecore Experience Commerce?
Thanks in advance for any support.
sitecore-commerce
add a comment |
I have installed Sitecore 9.1.0 XP and Experience Commerce 9.1.0.
Now I am trying to uninstall Sitecore Experience Commerce.
Is there any script to achieve this ? or uninstalling XP also uninstalls Sitecore Experience Commerce?
Thanks in advance for any support.
sitecore-commerce
I have installed Sitecore 9.1.0 XP and Experience Commerce 9.1.0.
Now I am trying to uninstall Sitecore Experience Commerce.
Is there any script to achieve this ? or uninstalling XP also uninstalls Sitecore Experience Commerce?
Thanks in advance for any support.
sitecore-commerce
sitecore-commerce
edited May 24 at 17:47
Peter Procházka
5,90211045
5,90211045
asked May 24 at 7:26
IndhumathiIndhumathi
536
536
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Please Use the below script to uninstall sitecore commerce.
Replace the parameters that match with your instance parameters.
#define parameters
Param(
[string]$Prefix = 'SiteInstanceName',
[string]$CommerceOpsSiteName = 'CommerceOps_Sc910',
[string]$CommerceShopsSiteName = 'CommerceShops_Sc910',
[string]$CommerceAuthoringSiteName = 'CommerceAuthoring_Sc910',
[string]$CommerceMinionsSiteName = 'CommerceMinions_Sc910',
[string]$SitecoreBizFxSiteName = 'SitecoreBizFx',
[string]$SitecoreIdentityServerSiteName = 'SitecoreIdentityServer',
[string]$SolrService = 'Solr-7.2.1',
[string]$PathToSolr = 'C:SolrSolr-7.2.1',
[string]$SqlServer = 'DESKTOPSQLEXPRESS',
[string]$SqlAccount = 'sa',
[string]$SqlPassword = 'sa5'
)
#Write-TaskHeader function modified from SIF
Function Write-TaskHeader
param(
[Parameter(Mandatory=$true)]
[string]$TaskName,
[Parameter(Mandatory=$true)]
[string]$TaskType
)
function StringFormat
param(
[int]$length,
[string]$value,
[string]$prefix = '',
[string]$postfix = '',
[switch]$padright
)
# wraps string in spaces so we reduce length by two
$length = $length - 2 #- $postfix.Length - $prefix.Length
if($value.Length -gt $length)
# Reduce to length - 4 for elipsis
$value = $value.Substring(0, $length - 4) + '...'
$value = " $value "
if($padright)
$value = $value.PadRight($length, '*')
else
$value = $value.PadLeft($length, '*')
return $prefix + $value + $postfix
$actualWidth = (Get-Host).UI.RawUI.BufferSize.Width
$width = $actualWidth - ($actualWidth % 2)
$half = $width / 2
$leftString = StringFormat -length $half -value $TaskName -prefix '[' -postfix ':'
$rightString = StringFormat -length $half -value $TaskType -postfix ']' -padright
$message = ($leftString + $rightString)
Write-Host ''
Write-Host $message -ForegroundColor 'Red'
Function Remove-Service
[CmdletBinding()]
param(
[string]$serviceName
)
if(Get-Service "My Service" -ErrorAction SilentlyContinue)
sc.exe delete $serviceName
Function Remove-Website
[CmdletBinding()]
param(
[string]$siteName
)
$appCmd = "C:windowssystem32inetsrvappcmd.exe"
& $appCmd delete site $siteName
Function Remove-AppPool
[CmdletBinding()]
param(
[string]$appPoolName
)
$appCmd = "C:windowssystem32inetsrvappcmd.exe"
& $appCmd delete apppool $appPoolName
#Stop Solr Service
Write-TaskHeader -TaskName "Solr Services" -TaskType "Stop"
Write-Host "Stopping solr service"
Stop-Service $SolrService -Force -ErrorAction stop
Write-Host "Solr service stopped successfully"
#Delete solr cores
Write-TaskHeader -TaskName "Solr Services" -TaskType "Delete Cores"
Write-Host "Deleting Solr Cores"
$pathToCores = "$pathToSolrserversolr$Prefix*"
Remove-Item $pathToCores -recurse -force -ErrorAction stop
Write-Host "Solr Cores deleted successfully"
#Remove Sites and App Pools from IIS
Write-TaskHeader -TaskName "Internet Information Services" -TaskType "Remove Websites"
Write-Host "Deleting Website $CommerceOpsSiteName"
Remove-Website -siteName $CommerceOpsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceShopsSiteName"
Remove-Website -siteName $CommerceShopsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceAuthoringSiteName"
Remove-Website -siteName $CommerceAuthoringSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceMinionsSiteName "
Remove-Website -siteName $CommerceMinionsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $SitecoreBizFxSiteName"
Remove-Website -siteName $SitecoreBizFxSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $SitecoreIdentityServerSiteName"
Remove-Website -siteName $SitecoreIdentityServerSiteName -ErrorAction stop
Write-Host "Websites deleted"
Remove-AppPool -appPoolName $CommerceOpsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceShopsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceAuthoringSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceMinionsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $SitecoreBizFxSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $SitecoreIdentityServerSiteName -ErrorAction stop
Remove-Item C:inetpubwwwroot$CommerceOpsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceShopsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceAuthoringSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceMinionsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$SitecoreBizFxSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$SitecoreIdentityServerSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Write-TaskHeader -TaskName "SQL Server" -TaskType "Drop Databases"
#Drop databases from SQL
Write-Host "Dropping databases from SQL server"
push-location
import-module sqlps
Write-Host $("Dropping database SitecoreCommerce9_Global")
$commerceDbPrefix = $("DROP DATABASE IF EXISTS [SitecoreCommerce9_Global]")
Write-Host $("Query: $($commerceDbPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U $SqlAccount -P $SqlPassword -Query $commerceDbPrefix -ErrorAction stop
Write-Host $("Dropping database [SitecoreCommerce9_SharedEnvironments]")
$sharedDbPrefix = $("DROP DATABASE IF EXISTS [SitecoreCommerce9_SharedEnvironments]")
Write-Host $("Query: $($sharedDbPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U $SqlAccount -P $SqlPassword -Query $sharedDbPrefix -ErrorAction stop
Write-Host "Databases dropped successfully"
pop-location
add a comment |
Additionally, if you need to blow away both XP and XC and start fresh, please check out the batch file linked to at the bottom of my blog post. Contents of the batch file below:
REM *****************************************************
REM This assumes the default and/or recommended names and directories for the Services, Sites, AppPools, etc. Your mileage may vary.
REM
REM After running this script, it is recommended you manually (and carefully) delete any certificates issued by DO_NOT_TRUST_SitecoreRootCert in the following stores:
REM Current UserTrusted Root Certification AuthoritiesCertificates
REM Local ComputerPersonalCertificates
REM Local ComputerTrusted Root Certification AuthoritiesCertificates
REM
REM *****************************************************
@ECHO OFF
sc stop XP0.xconnect-MarketingAutomationService
sc stop XP0.xconnect-ProcessingEngineService
sc stop XP0.xconnect-IndexWorker
sc stop Solr-7.2.1
IISRESET /STOP
sc delete XP0.xconnect-MarketingAutomationService
sc delete XP0.xconnect-ProcessingEngineService
sc delete XP0.xconnect-IndexWorker
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.identityserver
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.xconnect
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.sc
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceAuthoring_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceMinions_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceOps_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceShops_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site SitecoreBizFx
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.identityserver
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.xconnect
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.sc
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceAuthoring_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceMinions_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceOps_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceShops_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool SitecoreBizFx
RD C:inetpubwwwrootXP0.identityserver /S /Q
RD C:inetpubwwwrootXP0.xconnect /S /Q
RD C:inetpubwwwrootXP0.sc /S /Q
RD C:inetpubwwwrootCommerceAuthoring_Sc9 /S /Q
RD C:inetpubwwwrootCommerceMinions_Sc9 /S /Q
RD C:inetpubwwwrootCommerceOps_Sc9 /S /Q
RD C:inetpubwwwrootCommerceShops_Sc9 /S /Q
RD C:inetpubwwwrootSitecoreBizFx /S /Q
sqlcmd -Q "drop database [XP0_MarketingAutomation]"
sqlcmd -Q "drop database [XP0_Messaging]"
sqlcmd -Q "drop database [XP0_Processing.Pools]"
sqlcmd -Q "drop database [XP0_ProcessingEngineStorage]"
sqlcmd -Q "drop database [XP0_ProcessingEngineTasks]"
sqlcmd -Q "drop database [XP0_ReferenceData]"
sqlcmd -Q "drop database [XP0_Reporting]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.Shard0]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.Shard1]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.ShardMapManager]"
sqlcmd -Q "drop database [XP0_Core]"
sqlcmd -Q "drop database [XP0_Master]"
sqlcmd -Q "drop database [XP0_Web]"
sqlcmd -Q "drop database [SitecoreCommerce9_Global]"
sqlcmd -Q "drop database [SitecoreCommerce9_SharedEnvironments]"
sqlcmd -Q "drop database [XP0_EXM.Master]"
sqlcmd -Q "drop database [XP0_ExperienceForms]"
sqlcmd -Q "drop database [XP0_Processing.Tasks]"
sqlcmd -Q "drop login [XP0_collectionuser]"
sqlcmd -Q "drop login [%COMPUTERNAME%CSFndRuntimeUser]"
net user CSFndRuntimeUser /DELETE
net stop MSSQLSERVER
FOR /d %%i in (C:solr-7.2.1serversolrXP0*.*) DO RD "%%i" /S /Q
FOR /d %%i in (C:solr-7.2.1serversolrSitecore*.*) DO RD "%%i" /S /Q
DEL C:Certificates*.* /Q
DEL C:Encryption-Keys*.* /Q
sc start Solr-7.2.1
net start MSSQLSERVER
iisreset /start
The only thing it won't clean out automatically are the DO_NOT_TRUST certificates created through the XC installation.
Good luck!
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "664"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f18912%2funinstall-sitecore-commerce-9-1-0%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Please Use the below script to uninstall sitecore commerce.
Replace the parameters that match with your instance parameters.
#define parameters
Param(
[string]$Prefix = 'SiteInstanceName',
[string]$CommerceOpsSiteName = 'CommerceOps_Sc910',
[string]$CommerceShopsSiteName = 'CommerceShops_Sc910',
[string]$CommerceAuthoringSiteName = 'CommerceAuthoring_Sc910',
[string]$CommerceMinionsSiteName = 'CommerceMinions_Sc910',
[string]$SitecoreBizFxSiteName = 'SitecoreBizFx',
[string]$SitecoreIdentityServerSiteName = 'SitecoreIdentityServer',
[string]$SolrService = 'Solr-7.2.1',
[string]$PathToSolr = 'C:SolrSolr-7.2.1',
[string]$SqlServer = 'DESKTOPSQLEXPRESS',
[string]$SqlAccount = 'sa',
[string]$SqlPassword = 'sa5'
)
#Write-TaskHeader function modified from SIF
Function Write-TaskHeader
param(
[Parameter(Mandatory=$true)]
[string]$TaskName,
[Parameter(Mandatory=$true)]
[string]$TaskType
)
function StringFormat
param(
[int]$length,
[string]$value,
[string]$prefix = '',
[string]$postfix = '',
[switch]$padright
)
# wraps string in spaces so we reduce length by two
$length = $length - 2 #- $postfix.Length - $prefix.Length
if($value.Length -gt $length)
# Reduce to length - 4 for elipsis
$value = $value.Substring(0, $length - 4) + '...'
$value = " $value "
if($padright)
$value = $value.PadRight($length, '*')
else
$value = $value.PadLeft($length, '*')
return $prefix + $value + $postfix
$actualWidth = (Get-Host).UI.RawUI.BufferSize.Width
$width = $actualWidth - ($actualWidth % 2)
$half = $width / 2
$leftString = StringFormat -length $half -value $TaskName -prefix '[' -postfix ':'
$rightString = StringFormat -length $half -value $TaskType -postfix ']' -padright
$message = ($leftString + $rightString)
Write-Host ''
Write-Host $message -ForegroundColor 'Red'
Function Remove-Service
[CmdletBinding()]
param(
[string]$serviceName
)
if(Get-Service "My Service" -ErrorAction SilentlyContinue)
sc.exe delete $serviceName
Function Remove-Website
[CmdletBinding()]
param(
[string]$siteName
)
$appCmd = "C:windowssystem32inetsrvappcmd.exe"
& $appCmd delete site $siteName
Function Remove-AppPool
[CmdletBinding()]
param(
[string]$appPoolName
)
$appCmd = "C:windowssystem32inetsrvappcmd.exe"
& $appCmd delete apppool $appPoolName
#Stop Solr Service
Write-TaskHeader -TaskName "Solr Services" -TaskType "Stop"
Write-Host "Stopping solr service"
Stop-Service $SolrService -Force -ErrorAction stop
Write-Host "Solr service stopped successfully"
#Delete solr cores
Write-TaskHeader -TaskName "Solr Services" -TaskType "Delete Cores"
Write-Host "Deleting Solr Cores"
$pathToCores = "$pathToSolrserversolr$Prefix*"
Remove-Item $pathToCores -recurse -force -ErrorAction stop
Write-Host "Solr Cores deleted successfully"
#Remove Sites and App Pools from IIS
Write-TaskHeader -TaskName "Internet Information Services" -TaskType "Remove Websites"
Write-Host "Deleting Website $CommerceOpsSiteName"
Remove-Website -siteName $CommerceOpsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceShopsSiteName"
Remove-Website -siteName $CommerceShopsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceAuthoringSiteName"
Remove-Website -siteName $CommerceAuthoringSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceMinionsSiteName "
Remove-Website -siteName $CommerceMinionsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $SitecoreBizFxSiteName"
Remove-Website -siteName $SitecoreBizFxSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $SitecoreIdentityServerSiteName"
Remove-Website -siteName $SitecoreIdentityServerSiteName -ErrorAction stop
Write-Host "Websites deleted"
Remove-AppPool -appPoolName $CommerceOpsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceShopsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceAuthoringSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceMinionsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $SitecoreBizFxSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $SitecoreIdentityServerSiteName -ErrorAction stop
Remove-Item C:inetpubwwwroot$CommerceOpsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceShopsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceAuthoringSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceMinionsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$SitecoreBizFxSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$SitecoreIdentityServerSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Write-TaskHeader -TaskName "SQL Server" -TaskType "Drop Databases"
#Drop databases from SQL
Write-Host "Dropping databases from SQL server"
push-location
import-module sqlps
Write-Host $("Dropping database SitecoreCommerce9_Global")
$commerceDbPrefix = $("DROP DATABASE IF EXISTS [SitecoreCommerce9_Global]")
Write-Host $("Query: $($commerceDbPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U $SqlAccount -P $SqlPassword -Query $commerceDbPrefix -ErrorAction stop
Write-Host $("Dropping database [SitecoreCommerce9_SharedEnvironments]")
$sharedDbPrefix = $("DROP DATABASE IF EXISTS [SitecoreCommerce9_SharedEnvironments]")
Write-Host $("Query: $($sharedDbPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U $SqlAccount -P $SqlPassword -Query $sharedDbPrefix -ErrorAction stop
Write-Host "Databases dropped successfully"
pop-location
add a comment |
Please Use the below script to uninstall sitecore commerce.
Replace the parameters that match with your instance parameters.
#define parameters
Param(
[string]$Prefix = 'SiteInstanceName',
[string]$CommerceOpsSiteName = 'CommerceOps_Sc910',
[string]$CommerceShopsSiteName = 'CommerceShops_Sc910',
[string]$CommerceAuthoringSiteName = 'CommerceAuthoring_Sc910',
[string]$CommerceMinionsSiteName = 'CommerceMinions_Sc910',
[string]$SitecoreBizFxSiteName = 'SitecoreBizFx',
[string]$SitecoreIdentityServerSiteName = 'SitecoreIdentityServer',
[string]$SolrService = 'Solr-7.2.1',
[string]$PathToSolr = 'C:SolrSolr-7.2.1',
[string]$SqlServer = 'DESKTOPSQLEXPRESS',
[string]$SqlAccount = 'sa',
[string]$SqlPassword = 'sa5'
)
#Write-TaskHeader function modified from SIF
Function Write-TaskHeader
param(
[Parameter(Mandatory=$true)]
[string]$TaskName,
[Parameter(Mandatory=$true)]
[string]$TaskType
)
function StringFormat
param(
[int]$length,
[string]$value,
[string]$prefix = '',
[string]$postfix = '',
[switch]$padright
)
# wraps string in spaces so we reduce length by two
$length = $length - 2 #- $postfix.Length - $prefix.Length
if($value.Length -gt $length)
# Reduce to length - 4 for elipsis
$value = $value.Substring(0, $length - 4) + '...'
$value = " $value "
if($padright)
$value = $value.PadRight($length, '*')
else
$value = $value.PadLeft($length, '*')
return $prefix + $value + $postfix
$actualWidth = (Get-Host).UI.RawUI.BufferSize.Width
$width = $actualWidth - ($actualWidth % 2)
$half = $width / 2
$leftString = StringFormat -length $half -value $TaskName -prefix '[' -postfix ':'
$rightString = StringFormat -length $half -value $TaskType -postfix ']' -padright
$message = ($leftString + $rightString)
Write-Host ''
Write-Host $message -ForegroundColor 'Red'
Function Remove-Service
[CmdletBinding()]
param(
[string]$serviceName
)
if(Get-Service "My Service" -ErrorAction SilentlyContinue)
sc.exe delete $serviceName
Function Remove-Website
[CmdletBinding()]
param(
[string]$siteName
)
$appCmd = "C:windowssystem32inetsrvappcmd.exe"
& $appCmd delete site $siteName
Function Remove-AppPool
[CmdletBinding()]
param(
[string]$appPoolName
)
$appCmd = "C:windowssystem32inetsrvappcmd.exe"
& $appCmd delete apppool $appPoolName
#Stop Solr Service
Write-TaskHeader -TaskName "Solr Services" -TaskType "Stop"
Write-Host "Stopping solr service"
Stop-Service $SolrService -Force -ErrorAction stop
Write-Host "Solr service stopped successfully"
#Delete solr cores
Write-TaskHeader -TaskName "Solr Services" -TaskType "Delete Cores"
Write-Host "Deleting Solr Cores"
$pathToCores = "$pathToSolrserversolr$Prefix*"
Remove-Item $pathToCores -recurse -force -ErrorAction stop
Write-Host "Solr Cores deleted successfully"
#Remove Sites and App Pools from IIS
Write-TaskHeader -TaskName "Internet Information Services" -TaskType "Remove Websites"
Write-Host "Deleting Website $CommerceOpsSiteName"
Remove-Website -siteName $CommerceOpsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceShopsSiteName"
Remove-Website -siteName $CommerceShopsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceAuthoringSiteName"
Remove-Website -siteName $CommerceAuthoringSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceMinionsSiteName "
Remove-Website -siteName $CommerceMinionsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $SitecoreBizFxSiteName"
Remove-Website -siteName $SitecoreBizFxSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $SitecoreIdentityServerSiteName"
Remove-Website -siteName $SitecoreIdentityServerSiteName -ErrorAction stop
Write-Host "Websites deleted"
Remove-AppPool -appPoolName $CommerceOpsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceShopsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceAuthoringSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceMinionsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $SitecoreBizFxSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $SitecoreIdentityServerSiteName -ErrorAction stop
Remove-Item C:inetpubwwwroot$CommerceOpsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceShopsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceAuthoringSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceMinionsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$SitecoreBizFxSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$SitecoreIdentityServerSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Write-TaskHeader -TaskName "SQL Server" -TaskType "Drop Databases"
#Drop databases from SQL
Write-Host "Dropping databases from SQL server"
push-location
import-module sqlps
Write-Host $("Dropping database SitecoreCommerce9_Global")
$commerceDbPrefix = $("DROP DATABASE IF EXISTS [SitecoreCommerce9_Global]")
Write-Host $("Query: $($commerceDbPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U $SqlAccount -P $SqlPassword -Query $commerceDbPrefix -ErrorAction stop
Write-Host $("Dropping database [SitecoreCommerce9_SharedEnvironments]")
$sharedDbPrefix = $("DROP DATABASE IF EXISTS [SitecoreCommerce9_SharedEnvironments]")
Write-Host $("Query: $($sharedDbPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U $SqlAccount -P $SqlPassword -Query $sharedDbPrefix -ErrorAction stop
Write-Host "Databases dropped successfully"
pop-location
add a comment |
Please Use the below script to uninstall sitecore commerce.
Replace the parameters that match with your instance parameters.
#define parameters
Param(
[string]$Prefix = 'SiteInstanceName',
[string]$CommerceOpsSiteName = 'CommerceOps_Sc910',
[string]$CommerceShopsSiteName = 'CommerceShops_Sc910',
[string]$CommerceAuthoringSiteName = 'CommerceAuthoring_Sc910',
[string]$CommerceMinionsSiteName = 'CommerceMinions_Sc910',
[string]$SitecoreBizFxSiteName = 'SitecoreBizFx',
[string]$SitecoreIdentityServerSiteName = 'SitecoreIdentityServer',
[string]$SolrService = 'Solr-7.2.1',
[string]$PathToSolr = 'C:SolrSolr-7.2.1',
[string]$SqlServer = 'DESKTOPSQLEXPRESS',
[string]$SqlAccount = 'sa',
[string]$SqlPassword = 'sa5'
)
#Write-TaskHeader function modified from SIF
Function Write-TaskHeader
param(
[Parameter(Mandatory=$true)]
[string]$TaskName,
[Parameter(Mandatory=$true)]
[string]$TaskType
)
function StringFormat
param(
[int]$length,
[string]$value,
[string]$prefix = '',
[string]$postfix = '',
[switch]$padright
)
# wraps string in spaces so we reduce length by two
$length = $length - 2 #- $postfix.Length - $prefix.Length
if($value.Length -gt $length)
# Reduce to length - 4 for elipsis
$value = $value.Substring(0, $length - 4) + '...'
$value = " $value "
if($padright)
$value = $value.PadRight($length, '*')
else
$value = $value.PadLeft($length, '*')
return $prefix + $value + $postfix
$actualWidth = (Get-Host).UI.RawUI.BufferSize.Width
$width = $actualWidth - ($actualWidth % 2)
$half = $width / 2
$leftString = StringFormat -length $half -value $TaskName -prefix '[' -postfix ':'
$rightString = StringFormat -length $half -value $TaskType -postfix ']' -padright
$message = ($leftString + $rightString)
Write-Host ''
Write-Host $message -ForegroundColor 'Red'
Function Remove-Service
[CmdletBinding()]
param(
[string]$serviceName
)
if(Get-Service "My Service" -ErrorAction SilentlyContinue)
sc.exe delete $serviceName
Function Remove-Website
[CmdletBinding()]
param(
[string]$siteName
)
$appCmd = "C:windowssystem32inetsrvappcmd.exe"
& $appCmd delete site $siteName
Function Remove-AppPool
[CmdletBinding()]
param(
[string]$appPoolName
)
$appCmd = "C:windowssystem32inetsrvappcmd.exe"
& $appCmd delete apppool $appPoolName
#Stop Solr Service
Write-TaskHeader -TaskName "Solr Services" -TaskType "Stop"
Write-Host "Stopping solr service"
Stop-Service $SolrService -Force -ErrorAction stop
Write-Host "Solr service stopped successfully"
#Delete solr cores
Write-TaskHeader -TaskName "Solr Services" -TaskType "Delete Cores"
Write-Host "Deleting Solr Cores"
$pathToCores = "$pathToSolrserversolr$Prefix*"
Remove-Item $pathToCores -recurse -force -ErrorAction stop
Write-Host "Solr Cores deleted successfully"
#Remove Sites and App Pools from IIS
Write-TaskHeader -TaskName "Internet Information Services" -TaskType "Remove Websites"
Write-Host "Deleting Website $CommerceOpsSiteName"
Remove-Website -siteName $CommerceOpsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceShopsSiteName"
Remove-Website -siteName $CommerceShopsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceAuthoringSiteName"
Remove-Website -siteName $CommerceAuthoringSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceMinionsSiteName "
Remove-Website -siteName $CommerceMinionsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $SitecoreBizFxSiteName"
Remove-Website -siteName $SitecoreBizFxSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $SitecoreIdentityServerSiteName"
Remove-Website -siteName $SitecoreIdentityServerSiteName -ErrorAction stop
Write-Host "Websites deleted"
Remove-AppPool -appPoolName $CommerceOpsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceShopsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceAuthoringSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceMinionsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $SitecoreBizFxSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $SitecoreIdentityServerSiteName -ErrorAction stop
Remove-Item C:inetpubwwwroot$CommerceOpsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceShopsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceAuthoringSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceMinionsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$SitecoreBizFxSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$SitecoreIdentityServerSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Write-TaskHeader -TaskName "SQL Server" -TaskType "Drop Databases"
#Drop databases from SQL
Write-Host "Dropping databases from SQL server"
push-location
import-module sqlps
Write-Host $("Dropping database SitecoreCommerce9_Global")
$commerceDbPrefix = $("DROP DATABASE IF EXISTS [SitecoreCommerce9_Global]")
Write-Host $("Query: $($commerceDbPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U $SqlAccount -P $SqlPassword -Query $commerceDbPrefix -ErrorAction stop
Write-Host $("Dropping database [SitecoreCommerce9_SharedEnvironments]")
$sharedDbPrefix = $("DROP DATABASE IF EXISTS [SitecoreCommerce9_SharedEnvironments]")
Write-Host $("Query: $($sharedDbPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U $SqlAccount -P $SqlPassword -Query $sharedDbPrefix -ErrorAction stop
Write-Host "Databases dropped successfully"
pop-location
Please Use the below script to uninstall sitecore commerce.
Replace the parameters that match with your instance parameters.
#define parameters
Param(
[string]$Prefix = 'SiteInstanceName',
[string]$CommerceOpsSiteName = 'CommerceOps_Sc910',
[string]$CommerceShopsSiteName = 'CommerceShops_Sc910',
[string]$CommerceAuthoringSiteName = 'CommerceAuthoring_Sc910',
[string]$CommerceMinionsSiteName = 'CommerceMinions_Sc910',
[string]$SitecoreBizFxSiteName = 'SitecoreBizFx',
[string]$SitecoreIdentityServerSiteName = 'SitecoreIdentityServer',
[string]$SolrService = 'Solr-7.2.1',
[string]$PathToSolr = 'C:SolrSolr-7.2.1',
[string]$SqlServer = 'DESKTOPSQLEXPRESS',
[string]$SqlAccount = 'sa',
[string]$SqlPassword = 'sa5'
)
#Write-TaskHeader function modified from SIF
Function Write-TaskHeader
param(
[Parameter(Mandatory=$true)]
[string]$TaskName,
[Parameter(Mandatory=$true)]
[string]$TaskType
)
function StringFormat
param(
[int]$length,
[string]$value,
[string]$prefix = '',
[string]$postfix = '',
[switch]$padright
)
# wraps string in spaces so we reduce length by two
$length = $length - 2 #- $postfix.Length - $prefix.Length
if($value.Length -gt $length)
# Reduce to length - 4 for elipsis
$value = $value.Substring(0, $length - 4) + '...'
$value = " $value "
if($padright)
$value = $value.PadRight($length, '*')
else
$value = $value.PadLeft($length, '*')
return $prefix + $value + $postfix
$actualWidth = (Get-Host).UI.RawUI.BufferSize.Width
$width = $actualWidth - ($actualWidth % 2)
$half = $width / 2
$leftString = StringFormat -length $half -value $TaskName -prefix '[' -postfix ':'
$rightString = StringFormat -length $half -value $TaskType -postfix ']' -padright
$message = ($leftString + $rightString)
Write-Host ''
Write-Host $message -ForegroundColor 'Red'
Function Remove-Service
[CmdletBinding()]
param(
[string]$serviceName
)
if(Get-Service "My Service" -ErrorAction SilentlyContinue)
sc.exe delete $serviceName
Function Remove-Website
[CmdletBinding()]
param(
[string]$siteName
)
$appCmd = "C:windowssystem32inetsrvappcmd.exe"
& $appCmd delete site $siteName
Function Remove-AppPool
[CmdletBinding()]
param(
[string]$appPoolName
)
$appCmd = "C:windowssystem32inetsrvappcmd.exe"
& $appCmd delete apppool $appPoolName
#Stop Solr Service
Write-TaskHeader -TaskName "Solr Services" -TaskType "Stop"
Write-Host "Stopping solr service"
Stop-Service $SolrService -Force -ErrorAction stop
Write-Host "Solr service stopped successfully"
#Delete solr cores
Write-TaskHeader -TaskName "Solr Services" -TaskType "Delete Cores"
Write-Host "Deleting Solr Cores"
$pathToCores = "$pathToSolrserversolr$Prefix*"
Remove-Item $pathToCores -recurse -force -ErrorAction stop
Write-Host "Solr Cores deleted successfully"
#Remove Sites and App Pools from IIS
Write-TaskHeader -TaskName "Internet Information Services" -TaskType "Remove Websites"
Write-Host "Deleting Website $CommerceOpsSiteName"
Remove-Website -siteName $CommerceOpsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceShopsSiteName"
Remove-Website -siteName $CommerceShopsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceAuthoringSiteName"
Remove-Website -siteName $CommerceAuthoringSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $CommerceMinionsSiteName "
Remove-Website -siteName $CommerceMinionsSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $SitecoreBizFxSiteName"
Remove-Website -siteName $SitecoreBizFxSiteName -ErrorAction stop
Write-Host "Websites deleted"
Write-Host "Deleting Website $SitecoreIdentityServerSiteName"
Remove-Website -siteName $SitecoreIdentityServerSiteName -ErrorAction stop
Write-Host "Websites deleted"
Remove-AppPool -appPoolName $CommerceOpsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceShopsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceAuthoringSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $CommerceMinionsSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $SitecoreBizFxSiteName -ErrorAction stop
Write-Host "Application pools deleted"
Remove-AppPool -appPoolName $SitecoreIdentityServerSiteName -ErrorAction stop
Remove-Item C:inetpubwwwroot$CommerceOpsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceShopsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceAuthoringSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$CommerceMinionsSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$SitecoreBizFxSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Remove-Item C:inetpubwwwroot$SitecoreIdentityServerSiteName -recurse -force -ErrorAction stop
Write-Host "Websites removed from wwwroot"
Write-TaskHeader -TaskName "SQL Server" -TaskType "Drop Databases"
#Drop databases from SQL
Write-Host "Dropping databases from SQL server"
push-location
import-module sqlps
Write-Host $("Dropping database SitecoreCommerce9_Global")
$commerceDbPrefix = $("DROP DATABASE IF EXISTS [SitecoreCommerce9_Global]")
Write-Host $("Query: $($commerceDbPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U $SqlAccount -P $SqlPassword -Query $commerceDbPrefix -ErrorAction stop
Write-Host $("Dropping database [SitecoreCommerce9_SharedEnvironments]")
$sharedDbPrefix = $("DROP DATABASE IF EXISTS [SitecoreCommerce9_SharedEnvironments]")
Write-Host $("Query: $($sharedDbPrefix)")
invoke-sqlcmd -ServerInstance $SqlServer -U $SqlAccount -P $SqlPassword -Query $sharedDbPrefix -ErrorAction stop
Write-Host "Databases dropped successfully"
pop-location
answered May 24 at 7:43
RajasekarRajasekar
40110
40110
add a comment |
add a comment |
Additionally, if you need to blow away both XP and XC and start fresh, please check out the batch file linked to at the bottom of my blog post. Contents of the batch file below:
REM *****************************************************
REM This assumes the default and/or recommended names and directories for the Services, Sites, AppPools, etc. Your mileage may vary.
REM
REM After running this script, it is recommended you manually (and carefully) delete any certificates issued by DO_NOT_TRUST_SitecoreRootCert in the following stores:
REM Current UserTrusted Root Certification AuthoritiesCertificates
REM Local ComputerPersonalCertificates
REM Local ComputerTrusted Root Certification AuthoritiesCertificates
REM
REM *****************************************************
@ECHO OFF
sc stop XP0.xconnect-MarketingAutomationService
sc stop XP0.xconnect-ProcessingEngineService
sc stop XP0.xconnect-IndexWorker
sc stop Solr-7.2.1
IISRESET /STOP
sc delete XP0.xconnect-MarketingAutomationService
sc delete XP0.xconnect-ProcessingEngineService
sc delete XP0.xconnect-IndexWorker
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.identityserver
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.xconnect
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.sc
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceAuthoring_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceMinions_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceOps_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceShops_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site SitecoreBizFx
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.identityserver
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.xconnect
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.sc
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceAuthoring_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceMinions_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceOps_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceShops_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool SitecoreBizFx
RD C:inetpubwwwrootXP0.identityserver /S /Q
RD C:inetpubwwwrootXP0.xconnect /S /Q
RD C:inetpubwwwrootXP0.sc /S /Q
RD C:inetpubwwwrootCommerceAuthoring_Sc9 /S /Q
RD C:inetpubwwwrootCommerceMinions_Sc9 /S /Q
RD C:inetpubwwwrootCommerceOps_Sc9 /S /Q
RD C:inetpubwwwrootCommerceShops_Sc9 /S /Q
RD C:inetpubwwwrootSitecoreBizFx /S /Q
sqlcmd -Q "drop database [XP0_MarketingAutomation]"
sqlcmd -Q "drop database [XP0_Messaging]"
sqlcmd -Q "drop database [XP0_Processing.Pools]"
sqlcmd -Q "drop database [XP0_ProcessingEngineStorage]"
sqlcmd -Q "drop database [XP0_ProcessingEngineTasks]"
sqlcmd -Q "drop database [XP0_ReferenceData]"
sqlcmd -Q "drop database [XP0_Reporting]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.Shard0]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.Shard1]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.ShardMapManager]"
sqlcmd -Q "drop database [XP0_Core]"
sqlcmd -Q "drop database [XP0_Master]"
sqlcmd -Q "drop database [XP0_Web]"
sqlcmd -Q "drop database [SitecoreCommerce9_Global]"
sqlcmd -Q "drop database [SitecoreCommerce9_SharedEnvironments]"
sqlcmd -Q "drop database [XP0_EXM.Master]"
sqlcmd -Q "drop database [XP0_ExperienceForms]"
sqlcmd -Q "drop database [XP0_Processing.Tasks]"
sqlcmd -Q "drop login [XP0_collectionuser]"
sqlcmd -Q "drop login [%COMPUTERNAME%CSFndRuntimeUser]"
net user CSFndRuntimeUser /DELETE
net stop MSSQLSERVER
FOR /d %%i in (C:solr-7.2.1serversolrXP0*.*) DO RD "%%i" /S /Q
FOR /d %%i in (C:solr-7.2.1serversolrSitecore*.*) DO RD "%%i" /S /Q
DEL C:Certificates*.* /Q
DEL C:Encryption-Keys*.* /Q
sc start Solr-7.2.1
net start MSSQLSERVER
iisreset /start
The only thing it won't clean out automatically are the DO_NOT_TRUST certificates created through the XC installation.
Good luck!
add a comment |
Additionally, if you need to blow away both XP and XC and start fresh, please check out the batch file linked to at the bottom of my blog post. Contents of the batch file below:
REM *****************************************************
REM This assumes the default and/or recommended names and directories for the Services, Sites, AppPools, etc. Your mileage may vary.
REM
REM After running this script, it is recommended you manually (and carefully) delete any certificates issued by DO_NOT_TRUST_SitecoreRootCert in the following stores:
REM Current UserTrusted Root Certification AuthoritiesCertificates
REM Local ComputerPersonalCertificates
REM Local ComputerTrusted Root Certification AuthoritiesCertificates
REM
REM *****************************************************
@ECHO OFF
sc stop XP0.xconnect-MarketingAutomationService
sc stop XP0.xconnect-ProcessingEngineService
sc stop XP0.xconnect-IndexWorker
sc stop Solr-7.2.1
IISRESET /STOP
sc delete XP0.xconnect-MarketingAutomationService
sc delete XP0.xconnect-ProcessingEngineService
sc delete XP0.xconnect-IndexWorker
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.identityserver
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.xconnect
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.sc
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceAuthoring_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceMinions_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceOps_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceShops_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site SitecoreBizFx
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.identityserver
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.xconnect
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.sc
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceAuthoring_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceMinions_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceOps_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceShops_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool SitecoreBizFx
RD C:inetpubwwwrootXP0.identityserver /S /Q
RD C:inetpubwwwrootXP0.xconnect /S /Q
RD C:inetpubwwwrootXP0.sc /S /Q
RD C:inetpubwwwrootCommerceAuthoring_Sc9 /S /Q
RD C:inetpubwwwrootCommerceMinions_Sc9 /S /Q
RD C:inetpubwwwrootCommerceOps_Sc9 /S /Q
RD C:inetpubwwwrootCommerceShops_Sc9 /S /Q
RD C:inetpubwwwrootSitecoreBizFx /S /Q
sqlcmd -Q "drop database [XP0_MarketingAutomation]"
sqlcmd -Q "drop database [XP0_Messaging]"
sqlcmd -Q "drop database [XP0_Processing.Pools]"
sqlcmd -Q "drop database [XP0_ProcessingEngineStorage]"
sqlcmd -Q "drop database [XP0_ProcessingEngineTasks]"
sqlcmd -Q "drop database [XP0_ReferenceData]"
sqlcmd -Q "drop database [XP0_Reporting]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.Shard0]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.Shard1]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.ShardMapManager]"
sqlcmd -Q "drop database [XP0_Core]"
sqlcmd -Q "drop database [XP0_Master]"
sqlcmd -Q "drop database [XP0_Web]"
sqlcmd -Q "drop database [SitecoreCommerce9_Global]"
sqlcmd -Q "drop database [SitecoreCommerce9_SharedEnvironments]"
sqlcmd -Q "drop database [XP0_EXM.Master]"
sqlcmd -Q "drop database [XP0_ExperienceForms]"
sqlcmd -Q "drop database [XP0_Processing.Tasks]"
sqlcmd -Q "drop login [XP0_collectionuser]"
sqlcmd -Q "drop login [%COMPUTERNAME%CSFndRuntimeUser]"
net user CSFndRuntimeUser /DELETE
net stop MSSQLSERVER
FOR /d %%i in (C:solr-7.2.1serversolrXP0*.*) DO RD "%%i" /S /Q
FOR /d %%i in (C:solr-7.2.1serversolrSitecore*.*) DO RD "%%i" /S /Q
DEL C:Certificates*.* /Q
DEL C:Encryption-Keys*.* /Q
sc start Solr-7.2.1
net start MSSQLSERVER
iisreset /start
The only thing it won't clean out automatically are the DO_NOT_TRUST certificates created through the XC installation.
Good luck!
add a comment |
Additionally, if you need to blow away both XP and XC and start fresh, please check out the batch file linked to at the bottom of my blog post. Contents of the batch file below:
REM *****************************************************
REM This assumes the default and/or recommended names and directories for the Services, Sites, AppPools, etc. Your mileage may vary.
REM
REM After running this script, it is recommended you manually (and carefully) delete any certificates issued by DO_NOT_TRUST_SitecoreRootCert in the following stores:
REM Current UserTrusted Root Certification AuthoritiesCertificates
REM Local ComputerPersonalCertificates
REM Local ComputerTrusted Root Certification AuthoritiesCertificates
REM
REM *****************************************************
@ECHO OFF
sc stop XP0.xconnect-MarketingAutomationService
sc stop XP0.xconnect-ProcessingEngineService
sc stop XP0.xconnect-IndexWorker
sc stop Solr-7.2.1
IISRESET /STOP
sc delete XP0.xconnect-MarketingAutomationService
sc delete XP0.xconnect-ProcessingEngineService
sc delete XP0.xconnect-IndexWorker
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.identityserver
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.xconnect
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.sc
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceAuthoring_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceMinions_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceOps_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceShops_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site SitecoreBizFx
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.identityserver
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.xconnect
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.sc
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceAuthoring_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceMinions_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceOps_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceShops_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool SitecoreBizFx
RD C:inetpubwwwrootXP0.identityserver /S /Q
RD C:inetpubwwwrootXP0.xconnect /S /Q
RD C:inetpubwwwrootXP0.sc /S /Q
RD C:inetpubwwwrootCommerceAuthoring_Sc9 /S /Q
RD C:inetpubwwwrootCommerceMinions_Sc9 /S /Q
RD C:inetpubwwwrootCommerceOps_Sc9 /S /Q
RD C:inetpubwwwrootCommerceShops_Sc9 /S /Q
RD C:inetpubwwwrootSitecoreBizFx /S /Q
sqlcmd -Q "drop database [XP0_MarketingAutomation]"
sqlcmd -Q "drop database [XP0_Messaging]"
sqlcmd -Q "drop database [XP0_Processing.Pools]"
sqlcmd -Q "drop database [XP0_ProcessingEngineStorage]"
sqlcmd -Q "drop database [XP0_ProcessingEngineTasks]"
sqlcmd -Q "drop database [XP0_ReferenceData]"
sqlcmd -Q "drop database [XP0_Reporting]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.Shard0]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.Shard1]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.ShardMapManager]"
sqlcmd -Q "drop database [XP0_Core]"
sqlcmd -Q "drop database [XP0_Master]"
sqlcmd -Q "drop database [XP0_Web]"
sqlcmd -Q "drop database [SitecoreCommerce9_Global]"
sqlcmd -Q "drop database [SitecoreCommerce9_SharedEnvironments]"
sqlcmd -Q "drop database [XP0_EXM.Master]"
sqlcmd -Q "drop database [XP0_ExperienceForms]"
sqlcmd -Q "drop database [XP0_Processing.Tasks]"
sqlcmd -Q "drop login [XP0_collectionuser]"
sqlcmd -Q "drop login [%COMPUTERNAME%CSFndRuntimeUser]"
net user CSFndRuntimeUser /DELETE
net stop MSSQLSERVER
FOR /d %%i in (C:solr-7.2.1serversolrXP0*.*) DO RD "%%i" /S /Q
FOR /d %%i in (C:solr-7.2.1serversolrSitecore*.*) DO RD "%%i" /S /Q
DEL C:Certificates*.* /Q
DEL C:Encryption-Keys*.* /Q
sc start Solr-7.2.1
net start MSSQLSERVER
iisreset /start
The only thing it won't clean out automatically are the DO_NOT_TRUST certificates created through the XC installation.
Good luck!
Additionally, if you need to blow away both XP and XC and start fresh, please check out the batch file linked to at the bottom of my blog post. Contents of the batch file below:
REM *****************************************************
REM This assumes the default and/or recommended names and directories for the Services, Sites, AppPools, etc. Your mileage may vary.
REM
REM After running this script, it is recommended you manually (and carefully) delete any certificates issued by DO_NOT_TRUST_SitecoreRootCert in the following stores:
REM Current UserTrusted Root Certification AuthoritiesCertificates
REM Local ComputerPersonalCertificates
REM Local ComputerTrusted Root Certification AuthoritiesCertificates
REM
REM *****************************************************
@ECHO OFF
sc stop XP0.xconnect-MarketingAutomationService
sc stop XP0.xconnect-ProcessingEngineService
sc stop XP0.xconnect-IndexWorker
sc stop Solr-7.2.1
IISRESET /STOP
sc delete XP0.xconnect-MarketingAutomationService
sc delete XP0.xconnect-ProcessingEngineService
sc delete XP0.xconnect-IndexWorker
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.identityserver
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.xconnect
C:WindowsSystem32inetsrvappcmd.exe delete site XP0.sc
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceAuthoring_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceMinions_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceOps_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site CommerceShops_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete site SitecoreBizFx
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.identityserver
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.xconnect
C:WindowsSystem32inetsrvappcmd.exe delete apppool XP0.sc
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceAuthoring_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceMinions_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceOps_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool CommerceShops_Sc9
C:WindowsSystem32inetsrvappcmd.exe delete apppool SitecoreBizFx
RD C:inetpubwwwrootXP0.identityserver /S /Q
RD C:inetpubwwwrootXP0.xconnect /S /Q
RD C:inetpubwwwrootXP0.sc /S /Q
RD C:inetpubwwwrootCommerceAuthoring_Sc9 /S /Q
RD C:inetpubwwwrootCommerceMinions_Sc9 /S /Q
RD C:inetpubwwwrootCommerceOps_Sc9 /S /Q
RD C:inetpubwwwrootCommerceShops_Sc9 /S /Q
RD C:inetpubwwwrootSitecoreBizFx /S /Q
sqlcmd -Q "drop database [XP0_MarketingAutomation]"
sqlcmd -Q "drop database [XP0_Messaging]"
sqlcmd -Q "drop database [XP0_Processing.Pools]"
sqlcmd -Q "drop database [XP0_ProcessingEngineStorage]"
sqlcmd -Q "drop database [XP0_ProcessingEngineTasks]"
sqlcmd -Q "drop database [XP0_ReferenceData]"
sqlcmd -Q "drop database [XP0_Reporting]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.Shard0]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.Shard1]"
sqlcmd -Q "drop database [XP0_Xdb.Collection.ShardMapManager]"
sqlcmd -Q "drop database [XP0_Core]"
sqlcmd -Q "drop database [XP0_Master]"
sqlcmd -Q "drop database [XP0_Web]"
sqlcmd -Q "drop database [SitecoreCommerce9_Global]"
sqlcmd -Q "drop database [SitecoreCommerce9_SharedEnvironments]"
sqlcmd -Q "drop database [XP0_EXM.Master]"
sqlcmd -Q "drop database [XP0_ExperienceForms]"
sqlcmd -Q "drop database [XP0_Processing.Tasks]"
sqlcmd -Q "drop login [XP0_collectionuser]"
sqlcmd -Q "drop login [%COMPUTERNAME%CSFndRuntimeUser]"
net user CSFndRuntimeUser /DELETE
net stop MSSQLSERVER
FOR /d %%i in (C:solr-7.2.1serversolrXP0*.*) DO RD "%%i" /S /Q
FOR /d %%i in (C:solr-7.2.1serversolrSitecore*.*) DO RD "%%i" /S /Q
DEL C:Certificates*.* /Q
DEL C:Encryption-Keys*.* /Q
sc start Solr-7.2.1
net start MSSQLSERVER
iisreset /start
The only thing it won't clean out automatically are the DO_NOT_TRUST certificates created through the XC installation.
Good luck!
edited May 24 at 21:04
Glorfindel
111118
111118
answered May 24 at 13:21
SitecoreMattDSitecoreMattD
12
12
add a comment |
add a comment |
Thanks for contributing an answer to Sitecore Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f18912%2funinstall-sitecore-commerce-9-1-0%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown