Would it be possible to use Powershell to create a script that can retrieve and download the salesforce backup (Created via Salesforce schedule). Is that even possible?
You can access Salesforce via APIs, SOAP or REST:
http://www.salesforce.com/us/developer/docs/api/
https://www.salesforce.com/us/developer/docs/api_rest/
Related question: How to automate download of weekly export service files
Related
is it possible to delete a SharePoint site redirect through the Graph PowerShell SDK? I recently changed the SharePoint site URL of an existing MS365 group and now the old URL (e.g. https://domain.sharepoint.com/sites/GroupA) acts as a redirect to the new SharePoint site URL (e.g. https://domain.sharepoint.com/sites/GroupB). Since I want to reuse the old URL, I need to delete the redirect first.
The Microsoft docs state that this is possible through the SharePoint Online Management Shell. Unfortunately the Shell requires a Windows-based machine, which I cannot use. Therefore, I am trying to do this via the Graph PowerShell SDK.
Unfortunately, Microsoft does not seem to offer any functionality to delete SharePoint sites via the MS Graph API
The Sites API Reference shows that MS Graph is only capable of deleting a permission object on a site rather than a site itself.
As MS Graph API doesn't expose any endpoint to delete sites, it will not be possible with the Graph Powershell module either.
It's unfortunate that the SharePoint Online Management Shell doesn't support Powershell core and that the SharePoint admin center offers no ability to delete these site redirects.
If you're not able to use a Windows machine to achieve this, I suspect a support call to Microsoft may be your only other alternative.
As NiMux mentioned, it's not possible to delete SharePoint sites resp. site redirects via the MS Graph API. But another alternative is the PnP PowerShell module, which among other things provides several SharePoint Online cmdlets. I was able to remove the redirect with the cmdlet Remove-PnPTenantSite.
The module is open-source, community-developed, officially recommended by Microsoft and cross-platform which means it works on an Azure Ubuntu VM (tested it myself).
I have created a ML WebService on portal.azure.com. I wish to create multiple endpoints programmitically for this webservice using Powershell.
However all the cmdlets available (Add-AmlWebServiceEndpoint) involve using the Old or Classic WebServices.
Is there anyway to achieve this for New Azure ML WebServices
What version of PowerShell are you using, and have you imported the Azure-RM module? See here.
You can see updated documentation for all the cmdlets that can be used with ARM-based Azure Machine Learning web services here.
I am able to execute Custom Script Extensions against VMs using Set-AzureRmVMCustomScriptExtension and noticed that Azure App Services have Extensions listed as one of their options:
Extensions add functionality to your App Service. Click add to see the
list of available extensions.
What I would like to achieve is running some PowerShell against the VM hosting an App Service, but can't locate a Resource Manager cmdlet like Set-AzureRmVMCustomScriptExtension. An example is modifying the security of some of the directories of IIS hosting my website to disable anonymous access, and adding a few files to directories of my website. I am able to achieve this using a script against an IaaS Azure VM and am wondering if this will work against an App Service, and if so, how to target the VM of the App Service.
Key actions I take as part of this PowerShell is:
Disable anonymous access to certain directories in IIS
Limit access to certain file types
Edit existing XML files
Add new files to a directory (downloaded via CDN)
Logging into the Kudu interface (Mysite.scm.azure...) I am able to execute some PowerShell via the debug Console option, so I am thinking there has to be a way to run PowerShell via Azure Automation beyond the AzureRm.Websites cmdlets as with the Kudu PowerShell interface I was able to create directories with a plain old create-item cmdlet.
App Service is very different from VM hosting. In App Service, you never get direct access to the VM, and there is generally no way that you can run any script that affects the VM at a global level.
Instead, you are only able to affect the files that make up the Web App, and everything runs under a sandbox.
I am using sugarcrm comunity edition 6.5. I have create a module for file upload. I have tried to create a record and upload files to the module using rest api. Record is created successfully. But the problem is it is not uploading files to module. Where can I found information for creating custom rest api to upload file? Thanks
I want to run PS scripts in C# exactly along the lines of Sample
This works on a Cloud Service (Web Role), on a standard server (with execution policy disabled), but not in a Azure Web Site.
Anyone know why this is so?
I don't know of any official documentation on the issue but there are multiple answers on the related forums where Microsoft employees talk about the limitations of not being able/allowed to launch external processes in Windows Azure Web Sites. See
PHP - Warning: exec(): Unable to fork
PDF Generator failing on Azure Website but not development machine
Recommended HTML to PDF Generator that works on Azure Website Reserved mode with Full Trust
You are probably trying to do that with your powershell script.
You could verify if that is in fact your issue by catching and looking at the exception(s) which should relate to security policies/permissions.