Forum Discussion
Importing users into meeting policy
Or, try this command to connect to PowerShell instead;
Import-Module SkypeOnlineConnector $Cred = Get-Credential $Session = New-CSOnlineSession -credential $Cred -OverrideAdminDomain “tenantname.onmicrosoft.com”
- AB21805Apr 28, 2020Bronze Contributor
Hi PeterRising,
I didn't get any errors so thank you but I seem to not be able to run this to test if Im connected:
Get-CsOnlineUser -Filter {TeamsMessagingPolicy -eq ‘Test'} | Select UserPrincipalName
I get the following error:
Get-CsOnlineUser : The term 'Get-CsOnlineUser' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
Any Ideas?
- PeterRisingApr 28, 2020MVP
Try adding this command in;
Import-PSSession $session -AllowClobber -Verbose
Then run Get-CsOnlineUser cmd again.
- AB21805Apr 28, 2020Bronze Contributor
Thanks again PeterRising
This worked although Im getting asked to type these details in
:
after entering:
Get-CsOnlineUser-Filter {TeamsMessagingPolicy -eq 'Test'} | Select UserPrincipalName
This then brings up the error:
New-PSSession : [admin1e.online.lync.com] Connecting to remote server
admin1e.online.lync.com failed with the following error message : The WinRM client cannot
process the request. The authentication mechanism requested by the client is not supported
by the server or unencrypted traffic is disabled in the service configuration. Verify the
unencrypted traffic setting in the service configuration or specify one of the
authentication mechanisms supported by the server. To use Kerberos, specify the computer
name as the remote destination. Also verify that the client computer and the destination
computer are joined to a domain. To use Basic, specify the computer name as the remote
destination, specify Basic authentication and provide user name and password. Possible
authentication mechanisms reported by server: For more information, see the
about_Remote_Troubleshooting Help topic.
I am a global admin and I typed in the same details that worked at the start when I used
Import-Module SkypeOnlineConnector
$Cred = Get-Credential
$Session = New-CSOnlineSession -credential $Cred -OverrideAdminDomain "mytenant.onmicrosoft.com"
Why would this be?
Thanks again for your continuous help