I have a powershell script that uses the Quest One ActiveRoles Management Shell for Active Directory snap-in.
Scenario 1
When I'm in the office, the script runs very quickly (1 min). No errors.
Scenario 2
When I take my laptop home, and log into the laptop using the same account (although I'm not connected to the domain), the script takes 20 minutes to complete. No errors.
I have Internet access both at work and at home.
Script Code:
Function TestImport($a) { Get-Date Write-Host "Importing CRL" $Q_CRL = Import-QADCertificateRevocationList -FileName $a Write-Host "Import Complete" $CRL_ThisUpdate = $Q_CRL.EffectiveDate $CRL_NextPublish = $Q_CRL.NextPublish $CRL_NextUpdate = $Q_CRL.NextUpdate Write-Host "CRL Effective Date/Time: $CRL_ThisUpdate" Write-Host "CRL Next Publish Date/Time: $CRL_NextPublish" Write-Host "CRL Next UPdate Date/Time: $CRL_NextUpdate" Get-Date } TestImport "C:\TEMP\My.CRL"
The slowness occurs when the script starts the import using the snap-in.
Get-PSSnapin returns the following:
Name : Microsoft.PowerShell.CorePSVersion : 3.0
Description : This Windows PowerShell snap-in contains cmdlets used to manage components of Windows PowerShell.
Name : Quest.ActiveRoles.ADManagement
PSVersion : 1.0
Description : This Windows PowerShell snap-in contains cmdlets to manage Active Directory and Quest One ActiveRoles.
Get-ExecutionPolicy shows: RemoteSigned
Does anyone have any ideas as to why the snap-in would be running so slowly? All the other parts of the script seem to run just fine; no slowness. Any help would be greatly appreciated.
-m