Hi,
This is a part of my code, in the log start assembly to end assembly took 7 minutes. Tried with direct dll load but that doesn't help.
## - Loading the SQL Server SMO Assembly"
Get-WFALogger -Info -message $('Start load Assembly')
#[System.Reflection.Assembly]::loadwithPartialName("Microsoft.SQLServer.SMO");
[System.Reflection.Assembly]::loadfrom("C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Smo\11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Smo.dll")
Get-WFALogger -Info -message $('End load Assembly: ')
09:27:35.046 INFO [_Detach_SQL_DB] ### Command '_Detach_SQL_DB' ###
09:27:36.169 INFO [_Detach_SQL_DB] Executing command: ./_Detach_SQL_DB3112812273117812986.ps1 -DBs @('(AdventureWorksDEV)') -MachineName gdc00304\DBA_TEST
09:27:36.200 INFO [_Detach_SQL_DB] Start load Assembly
09:35:34.827 INFO [_Detach_SQL_DB] End load Assembly:
09:35:34.842 INFO [_Detach_SQL_DB] Connect to SQL: gdc00304\DBA_TEST
09:35:48.664 INFO [_Detach_SQL_DB] Working on: (AdventureWorksDEV)
09:35:48.898 INFO [_Detach_SQL_DB] Nothing to detach for: (AdventureWorksDEV)
09:35:51.332 INFO [_Detach_SQL_DB] Command completed, took 496286 milliseconds
Regards,
francois