I am a total newbie to powershell and MSOnline. I have been tasked with automating user creation from an internal WCF web service. We are running a HYBRID O365 Exchange setup with a LocalServer and the O365 portion.
Using remote PS connections from my vb.net code, I have been able to create the user, update AD properties, force the synchronization to the online system and then reach out and update the online information.
My problem is updating the License for the user on O365. In testing my script in PowerShell, I can't seem to get a remote connection that recognizes the MSOnline commands. Below is my PS testing just to figure out the scripting that I need to generate. Any help would be greatly appreciated.
Sincerely,
Glen
When I run the script below, the list of available modules that results seems to be the local machine's instead of the localserver to which I'm remoting. MSOnline does NOT show up!
$cred = Get-Credential $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://localserver/powershell -Credential $cred -Authentication Kerberos -AllowRedirection Import-PSSession $s -AllowClobber Get-Module -PSSession $s -ListAvailable