Your tenant is Disabled for this service. You are not permitted to use this cmdlet - Skype Online - powershell

I am running the following PowerShell command but getting error.
I have used my CSP credentials to connect to the Skype Online session.
Set-CsOnlineVoiceUser -Identity user#example.com -TelephoneNumber +12221115654654
Error is as following
Your tenant is Disabled for this service. You are not permitted to use this cmdlet.
+ CategoryInfo : NotSpecified: (:) [Set-CsOnlineVoiceUser], BvdCmdletException
+ FullyQualifiedErrorId : TenantNotEnabledPSTN,Microsoft.Rtc.Management.Hosted.Bvd.SetVoiceUserCmdlet
+ PSComputerName : adminca1.online.lync.com

This error occurs when no user is a valid "voice user" within your tenant.
You can verfiy this by running Get-CsOnlineVoiceUser.
The output will be
WARNING: No more business voice user available for tenant <id>
without any user.
A valid "Voice User" must have
at least Office 365 E3 License
a "phonesystem" license (if not Office 365 E5)
a PSTN Calling Plan (inland pstn calling 120 minutes for example)
more infos: https://products.office.com/en-us/microsoft-teams/voice-calling

Related

Powershell - MailboxFolderPermissions problem with multiple Exchange Servers

I've been trying to solve this problem for days and at least narrowed it down. I'm writing a script for my company with a user interface that allows my colleagues to easily create a new Active Directory user based on a template user, create a new mailbox and add Calendar permissions to their Manager.
Everything is working except for adding the Calendar permissions.
We are running two Exchange Servers, let's call them Exchange1 and Exchange2. Enabling the mailbox based on the AD user works fine but when I get to the step of adding calendar permissions I get this error:
The mailbox /o=COMPANY/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=EXCHANGE2/cn=Microsoft System
Attendant kann nicht geƶffnet werden.
+ CategoryInfo : NotSpecified: (:) [Add-MailboxFolderPermission], MailboxUnavailableException
+ FullyQualifiedErrorId : [Server=EXCHANGE1,RequestId=4f818454-7ffc-4fd9-b57d-594bedd7fab6,TimeStamp=15.10.2020 14:11:32] [FailureCategory=Cmd
let-MailboxUnavailableException] 676ABDB0,Microsoft.Exchange.Management.StoreTasks.AddMailboxFolderPermission
+ PSComputerName : EXCHANGE1
The command I'm trying to run:
Enable-Mailbox -Identity $ADUser
$EmailCalendar = $Email + ":\Calendar"
Add-MailboxFolderPermission -Identity $EmailCalendar -User $Manager -AccessRights Editor
I'm really new to using Powershell administrating Exchange servers, so I'm kind of at my troubleshooting end. It doesn't matter if I connect to EXCHANGE1 or EXCHANGE2, the error message stays the same and I'm having trouble understand why the mailbox is unavailable.
Any help is appreciate:)

Powershell connecting to Sharepoint online using Active directory

To start, I am using Windows 7, I am a full adminstrator on this machine
I have tried other machines and ran as an administrator as well
I am only a sharepoint site collection admin
In powershell we connect to Sharepoint online. during this process, if I use Connect-PnPOnline -Url $masterSiteUrl -useweblogin, I get prompted for a username, however the next screen is blank and stays there.
when I do a view source of that page I get
d>Redirecting....myshn.net/certcheck" method="POST">
I do have scripting enabled and sometimes I get a certificate issue, I have clicked "Install Certificate" although I am not sure what it did, but it still doesnt work
Ive also tried -SPOManagementShell and -ClearTokenCache
and get the following error
Connect-PnPOnline : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1
+ Connect-PnPOnline -Url $masterSiteUrl -useweblogin -spoManagementShel ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Connect-PnPOnline], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,SharePointPnP.PowerShell.Commands.Base.ConnectOnline
See this:
Connect to all Office 365 services in a single Windows PowerShell
and this...
Connect to all Office 365 Services PowerShell - Supports MFA too
Using our All-in-One PowerShell script, you can connect to all Office
365 Services using a single cmdlet. It supports both MFA and non-MFA
account -Exchange Online -Azure AD -SharePoint Online -Skype for
Business Online -Security & Compliance Center -Teams
Download: ConnectO365Services.ps1
O365_Logon 1.1
O365 logon cmdlets to assist IT administrators. In this module, there
are several cmdlets that simplify the process of logging onto various
O365 components.

How to install Outlook Web Add-In to a Distribution Group in Exchange Server 2013?

I am trying to install a Outlook web add-in for a Distribution Group on Exchange Server 2013. I have created a group of users and in accordance with Install or remove add-ins for Outlook for your organization, I am trying to assign the app to only that group.
When I try to run the command from the Exchange PowerShell, it is unable to find the AppId of my Outlook Web Add-in.
[PS] C:\Windows\system32>$a = Get-DistributionGroupMember MyGroup-Users
[PS] C:\Windows\system32>Set-App -Identity badb297b-b8e8-41e1-9513-ff821c15189c -OrganizationApp -ProvidedTo SpecificUsers -UserList $a.Identity -DefaultStateForUser Enabled
The operation couldn't be performed because 'badb297b-b8e8-41e1-9513-ff821c15189c' couldn't be found.
+ CategoryInfo : NotSpecified: (:) [Set-App], ManagementObjectNotFoundException
+ FullyQualifiedErrorId : [Server=WIN-MASKED,RequestId=207e8697-a42c-4460-af5e-fccfe027c8db,TimeStamp=7/6/201
8 10:59:33 AM] [FailureCategory=Cmdlet-ManagementObjectNotFoundException] 291FF391,Microsoft.Exchange.Management.E
xtension.SetApp
+ PSComputerName : win-j0qd2spo6mv.mydomain.com
What I have tried
I have tried installing the app for all users in organisation before and after running these commands.
The guid is the one from the Id section in the XML manifest of Outlook Web Add-in. Am I supposed to use the same Id as AppId or it is something else?

Access denied adding domain user to local administrators group

When adding a domain user to the local administrators group I receive an access denied, this worked before and now sadly and strangely it no longer does.
$user = "mydomain/user"
$group = [ADSI]"WinNT://./Administrators,group"
$group.Add("WinNT://$user,user")
Exception calling "Add" with "1" argument(s): "Access is denied.
"
At C:\test\Untitled5.ps1:3 char:1
+ $group.Add("WinNT://$user,user")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : CatchFromBaseAdapterMethodInvokeTI
Logged on as a domain administrator
Same error using the PowerShell ISE or the console
Yet, I am able to add the user through the Computer Management MMC snap-in, no problem.
This is most likely User Account Control (UAC) related. Make sure you run PowerShell "As Administrator." Otherwise, if you're not running "as admin," you're running PowerShell under your user's account's standard user token, which doesn't have access to make this change.

Microsoft CRM Dynamics 2011 PowerShell Error when disabling an organization

Whenever I try the following line in a powershell script :
Disable-CrmOrganization -Name MyOrganization
I get the following error :
Disable-CrmOrganization : The Deployment Service cannot process the request because one or more validation checks failed.
+ Disable-CrmOrganization <<<< -Name MyOrganization
+ CategoryInfo : NotSpecified: (:) [Disable-CrmOrganization], FaultException`1
+ FullyQualifiedErrorId : System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.Deployment.DeploymentServiceFaul
t, Microsoft.Crm.PowerShell, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],Microsoft.Crm.Pow
erShell.DisableCrmOrganizationCmdlet
However, if I manually disable the organization, I am able to execute the following line with no problem :
Remove-CrmOrganization -Name MyOrganization
Any idea why I cannot disable the organization with powershell?
You might have run across this page: Use PowerShell to Call the Deployment Web Service for the CRM PowerShell references.
Running this command gives additional error details: $error[0].Exception.Detail.ErrorDetails
Additionally the Windows Application Event Log was showing an error (in my case anyway):
Web service request FindItems to Report Server http://myserver/reportserver/ReportService2005.asmx failed with SoapException. Error: The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this operation.
Which lead me to this post:
http://social.microsoft.com/Forums/en/crm/thread/0dd4a41b-eeba-405c-9b56-c32bfedb9e7a
The solution was to run the CrmDeploymentServiceAppPool under an account with elevated priviledges. Logon as a service and sysadmin in SQL Server according to the post.
How to enable tracing in Microsoft Dynamics CRM
when I execute 2 times it works so try with:
try {
Disable-CrmOrganization -Name "oragnization_name"
}catch {
Disable-CrmOrganization -Name "oragnization_name"
}