I have a program which uses Office 365 Powershell to query O365 information. it works fine. Now, we want to use Azure and put this part into a webjob.
Now, we can pass the credentail into the powershell (using C# code), but when it runs as a webjob, it always shows error, see the screen shot. It says that the cmdlet is not recognized.
I know even on our local machine, we will need to install Windows Azure Active Directory Module to run Office365 powershell. Could the error be because in the Azure, it does not have this module?
So the question is: is there a way to install/integrate this into Azure webjob? or, is there other way that we could run Office 365 powershell in Azure webjob?
Thanks
Related
Im running a Windows-based App Service.
Im running a backup of a fairly large git repo and I'm wanting to clone directly to Azure Blob/File/S3. Cloning locally leads to an out-of-memory exception. I realise that you can mount azure storage, but this is just for Linux based apps.
Im using LibGit2Sharp ti run the Repository.Clone function. I've tried mapping a network drive on my Azure Webjob, but I get an "Access Denied"
When you create azure web app, if you choose option of Publish is Code, like below. It don't support net use command. These webapp are running in standard sandbox env.
Solution:
Create your web app like below. Docker Container will solve your problem.
Although the container webapp also runs in the sandbox environment, you can customize many configurations.
In local, I test net use command, which is same as windows container app.
I was developing an Asp.Net web application that will execute particular PowerShell Commands for Office 365. The code contains two parts of the commands (Exchange Online and MSOnline Command). The code is working fine locally on my PC. But When I published the code into Azure Web App the Exchange Online Commands are working as I expected it, but MSOnline commands are giving the below error:
The term 'Connect-MsolService' 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.
I am sure that this error has raised because it did not find the matched MSOnline dlls files to import the module. I have added the dll's using Kudo but also the same. anyone have any idea how to solve this one.
Thank you always
Doing some reading here and here, it looks like you aren't allowed to install the prerequisites needed unless you upgrade (the answer in that second link describes that).
I have had to do this too: call PowerShell from C# for Office 365 administration, so I feel your pain :) although we host on a normal Windows server.
I am using CloudShell to deploy Azure Services using PowerShell Scripts. It's a great experience.Now I want to use CloudShell to automate deployment. I am maintaining a solution in TFS/VSTS.
Is there any way or workaround to call OR to get the CloudShell instance or to run Powershell on CloudShell using some Batch command or C# or else.
Is any CloudShell API exist to use CloudShell service from .Net
No, there's no API behind the CloudShell, but its just a bash shell that's using Azure CLI and Azure Powershell. You can use those on your own.
You can access the open source project for Azure Cloud Shell on github and run the Azure Cloud Shell container locally using docker. Not sure this meets your need, but it's a cool option nonetheless.
As per my knowledge, Azure Cloud is an interactive, browser-accessible for managing Azure resources. You cannot use Azure Cloud Shell for Continuous Deployment.
Note: Azure Cloud Shell is an interactive, browser-accessible shell for managing Azure resources. It gives you the flexibility of choosing the shell experience that best suits the way you work. Linux users can opt for a Bash experience, while Windows users can opt for PowerShell.
For more details, refer "Overview of Azure Cloud Shell (Preview)"
I have had a difficulty to add credentials and deploy any asp.net application. I have created account and application in the google cloud platform but when i have tried to add windows credentials in visual studio(2017) it has shown this error. It has shown it after the program asking me to reset the password for the specific username. What could be the problem?
The error is that your system isn't finding the "gcloud" command, which is part of the Google Cloud SDK.
Install the Cloud SDK.
Ensure that the gcloud command is added to your system's PATH environment variable. If you use the interactive installer this last step should be done for you.
Restart your system or IDE if it isn't picking up the change after installing the SDK. If it still isn't finding the application, you might need to manually edit your environment variable or point your IDE to the specific SDK location.
I need to console application to load the VisualSVN Server User Access Rights to the excel file.
Initially, I started with VBScript to do this. But in VBScript it is very hard to compare two csv files. So currently I'm looking into C#.
Is any sample to code to do this in C# like VBScript in "http://www.svnforum.org/threads/38790-Access-Rights-Reporting-in-Subversion-or-Viusal-SVN"?
If it is quit easy in PowerShell, We will consider PowerShell too. But I don't have experience with PowerShell. Can anyone please redirect me to the Sample code to do the same.
VisualSVN Server 3.4 comes with a PowerShell module which provides a number of cmdlets for server and repository administration (works locally or remotely).
Getting a list of access rules with VisualSVN Server 3.4 is as simple as running Get-SvnAccessRule cmdlet in PowerShell.
For the complete list of PowerShell cmdlets and usage examples, read the article VisualSVN Server PowerShell Cmdlet Reference.