Thanks, Matt, but that didn't work either. I am a global admin in O365, and since the session works perfectly if I connect and import the module manually, I don't believe it's got anything to do with execution policy or elevation. :-(
I have it working now, but not exactly as I had intended. Maybe I was just over-complicating things. In my local powershell profile file (Microsoft.Powershell_profile.ps1), I have just two lines:
. \\fileserver\users\mike\mike.ps1
Import-Module MikesTools
The first line points to a script containing functions that I can access from any location on the network - things like setting my psconsole settings, importing the activedirectory module, sets an alias or two, and starts a transcript, then clears the screen.
The second line imports a custom module containing functions specific to this machine, my primary working environment. It is in this module that I placed a custom function named Connect-Office365, in which I had the commands to create and import the PSSession
to Exchange Online. For the record, this method does not seem to work. From all appearances, the remote session is created and imported, but at the very end, I get the warning about unapproved verbs, and then none of the Exchange Online commands are available.
This morning, I moved my Connect-Office365 function from the MikesTools module into my local profile, and now it seems to work properly, with all of the Exchange Online commands now available.
I'm a bit disappointed. I would much prefer to keep all of my custom functions in the MikesTools module, but I guess I can live with this. The goal was to not have to enter the commands manually, and this accomplishes that goal.
Thanks to everyone for their help and advice. I appreciate it very much.
Mike