Replies: 1 comment 6 replies
-
|
The best reason I can think about is for the readability of ones script if you have multiple environments. If I have done what you suggested could there be scenarios where you had to run Initialize-CapaSDK multiple times to switch between the environments? Then it makes more sense to define if a cmdlet is to be run against ones production or development environment. Example $oCMSProd = Initialize-CapaSDK -Server $Settings.CapaServer -Database $Settings.Database -InstanceManagementPoint $Settings.InstanceManagementPointProd
$oCMSDev = Initialize-CapaSDK -Server $Settings.CapaServer -Database $Settings.Database -InstanceManagementPoint $Settings.InstanceManagementPointDev
# Remove-OldUnits is a custom function in my script that deletes old use units
Remove-OldUnits -CapaSDK $oCMSDev -Settings $Settings
Remove-OldUnits -CapaSDK $oCMSProd -Settings $Settings |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a reason why the Initialized sdk is not saved to enviroment so all modules can pull that instead of it needing to be passed to all cmdlets? :)
Beta Was this translation helpful? Give feedback.
All reactions