Comments
3 comments
-
Hi @DatabaseOperations,
This page seems to indicate that the Get-Command can automatically import the commands, but doesn't say whether this will occur when you use the -Module parameter so may not be the case.
I suppose one way to check is to use theGet-Command -List-Imported
parameter first to see if the DLMAutomation cmdlets have been imported to the session, then use the Get-Command from your step 2 and then the -List-Imported parameter onceonce more.
Also, the version 2.1.3 of DLM Automation is six months old and you may want to look into updating to SQL Change Automation!
Kind regards,
Alex -
Thanks for your reply. @Alex B
To make it work, I added an extra step at the top of my automation code to import the module (Import-Module DlmAutomation).
Please note, with DLM 1.4, I didn't have to do this import step.
I plan on upgrading to SCA soon. Could you confirm that the existing cmdlets from DLM 2.1 will work the same in SCA?
-
Hi @DatabaseOperations,
I'm not sure why it would not be showing the cmdlets when they exist; if you have installed DLM Automation it usually prompts you to restart the computer to make sure that currently running applications or services have access to the new modules so maybe it's something related to that? At any rate, adding the import won't hurt anything and will ensure that they are available if they are not.
For SCA, the existing DLM should continue to work (see the release notes):All existing DLM Automation features and workflows continue to be supported. Existing scripts that use DLM Automation cmdlets will continue to work with the SQL Change Automation module.Kind regards,
Alex
Add comment
Please sign in to leave a comment.
Step 1 -
PS> Register-DlmSerialNumber 111-111-111111-1111
Step 2 -
Step 3 -
PS> Register-DlmSerialNumber 111-111-111111-1111
This runs as expected only after step 2.