I am looking for Get-MsolUserByStrongAuthentication equivalent for Azure Powershell / Azure Cli
The Windows Azure Active Directory Module for Windows PowerShell cmdlets can be used to accomplish many Windows Azure AD tenant-based administrative tasks such as user management, domain management and for configuring single sign-on
Install the Windows Azure Active Directory Module for Windows PowerShell
Connect to Windows Azure AD by running the PowerShell command import-module MSOnline
then you are good to proceed.
Hope it helps.
Related
I'm looking for a way to use my machine-local PowerShell ISE or VSCode to connect to Azure Runbooks. Usually, one has to scaffold locally and then test in the cloud in an Azure runbook. Has anybody ever done this?
One way I'm looking into it is this idea but I was wondering if you knew of something more convenient.
To connect from local (VScode) to Azure Runbooks:
Thanking #Kaido Järvemets for detailed steps. I've tried by considering few steps from there and was able to connect successfully.
Check for Azure Automation extension in Visual Studio code.
To work with Azure automation from local, we need to set up a few settings by searching "Preferences: User settings" (ctrl+shift+p).
Register a new application under Azure Active Directory and add the respective "client_id, client_secret, automation_account_name, subscription_id,tenant_id" in extension settings of Azure Automation configuration.
Give the required permissions in Automation Account -> Access Control (IAM) as shown here:
Created a PowerShell runbook script to run connect-AzAccount under Azure Automation Account through portal.
Opened the same runbook in Azure Automation and was able to connect from local (vscode)to Azure.
Note: Search for Automation explorer (ctrl+shift+p) and create a new runbook if needed. you can run the same script in Azure portal also & it will work as described above.
All the instructions I've found for enrolling devices in Azure AD require the user to manually log a machine in to Azure AD themselves to enroll.
Is there any way to enroll machines from Powershell? I'm looking at enrolling about 200 machines and not looking forward to having users login to Azure AD one by one manually.
Thanks!
For your scenario you should use something called bulk enrollment.
Steps are:
Create configuration file called provisioning package (*.ppkg) using Windows Configuration Designer tool. More info: https://learn.microsoft.com/en-us/mem/intune/enrollment/windows-bulk-enroll#create-a-provisioning-package.
Don't use the desktop wizard here, since bulk Azure AD deployment can only be configured via advanced configuration.
Deploy the *.ppkg file using PowerShell command Add-ProvisioningPackage. More info is here: https://learn.microsoft.com/en-us/windows/configuration/provisioning-packages/provisioning-powershell
I have a few resource groups in my Azure subscription. Is there an Azure CLI Powershell script / command ---- to find all/any services that are being used which are in [Preview] and are not [Generally Available].
AFAIK, there is no way to do that via powershell or cli.
If you want to know if a service is in preview or generally available, check out https://azure-overview.com/.
We are using Azure Automation DSC and were able to do simple things like create Automation account, create Resource group, VM creation and even able to deploy a web site on the target VM. All using powershell scripting.
How can we deploy Azure Cloud Services (web role / worker role)? what are the cmdlets? Any pointers? Please help.
What more things can be achieved using this? Moreover what limitations we can expect here.
Best Regards
Azure DSC is really focused on Azure's Infrastructure as a Service (IaaS) offering. Basically you can configure virtual servers (Windows and Linux) hosted on Azure.
To manage configurations for other services in Azure it is recommended to utilize Azure Resource Manager (ARM) which will allow you to define and configure Azure services in JSON.
Microsoft offers a lot of Quick Start ARM templates that can be accessed at the Azure Quickstart site.
I found all Azure Management Cmdlets here:
Windows Azure Management Cmdlets.
My question is how can I use these cmdlets in C# to create, remove and deploy an Azure Website?
Windows Azure managemnet cmdlets have been updated and now it includes web site creation. Check it here.
Without azure login we can not fire any command. We can Create Website in following steps.
Login to AzureAccount (Add-AzureAccount)
Setup The Azure Subscription (Get-AzureSubscription)
Select Azure Subscription (Select-AzureSubscription -Name AzureSubName)
Then We Can Deploy Azure site here
Ref to deploy site : http://blogs.msdn.com/b/cdndevs/archive/2015/04/23/azure-powershell-azure-websites-for-the-command-line-junkies-part-1.aspx
Here is a link to the samples from my book, PowerShell for Developers.
This example embeds the PowerShell engine in a C# application. You can then call the Azure PowerShell cmdlets and/or external PowerShell scripts that contain the workflow that you develop.
http://goo.gl/4kiYa