Variable not permanently set for new sessions

I have a module that I have been using on my dev box with no problems. On the production box it will run after the initial setup but after the session ends it has an error on the next run. At that point I can run a configuration script and it works again for just that session. The module is PowerTrello. The closest I could find on Google was configuring Set-StrictMode, after checking both environments are set to OFF.

New-TrelloCard : The variable '$trelloConfig' cannot be retrieved because it has not been set.
At E:\trello.ps1:9 char:14
+ ...    $newCard=New-TrelloCard -ListId $listId -Name $name -Description $ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-TrelloCard

If you need to make a variable available for all PowerShell sessions you may define it in the $Profile for AllUsersAllHosts.


Thank you for looking at my problem. I am not understanding how your idea works. As this is not my module I am not sure how to accomplish this. However, I looked into the $profile and $profile.allusersallhosts and neither existed on both my dev and production boxes.

I don’t know this module. Did you install the module properly on your production box? If you think it is a bug you may contact the author of the module.

It is a fairly simple installation, I will try to reinstall it and take additional time to research. If it seems there is a bug I will make a report but I just think it is my own issue at this point. Regardless, here is the module if you would like to take a look.

I already found it - it’s not hard. :wink: But since I don’t have any use for it it doesn’t make that much sense for me to install it. Sorry.