All Questions
Tagged with powershell azure
6,285 questions
1
vote
1
answer
22
views
Issues with winget on Azure VMs
I have several VMs in Azure where I want to update all applications using winget upgrade. The VMs are running Windows Server 2016/2022, and I have manually installed winget on them. When I log into ...
0
votes
1
answer
45
views
Generating SAS account token in powershell
"I generated a token using Azure and it’s working, but I need to create a correct script in PowerShell using the key. The stringToSign I generated is different from the one provided by Azure, and ...
0
votes
0
answers
26
views
Set-AzureADMSTrustFrameworkPolicy powershell cmdlet works on laptop but not in github actions. No changes done
I have created a service principle in Azure AD B2C and want to upload TrustFrameworkExtensions.xml file to it using Set-AzureADMSTrustFrameworkPolicy powershell cmdlet in GHA. Everything in this works ...
0
votes
0
answers
37
views
Azure DevOps pipeline PowerShell task
I am using Azure DevOps pipeline and task 'AzurePowershell@5'. With that task I trigger script, which is on the repo- let's call it script X. Script X contains commands like 'Import-...
1
vote
1
answer
30
views
Adding / setting Virtual Applications (Path mappings) to a Web App (App Service Azure) - via Powershell Script
Is it possible to add, via Powershell Script, Virtual Application Paths, Virtual and Physical to a Web App (App Service - Azure), or this is just possible, via graphical interface, in the Azure portal ...
0
votes
1
answer
84
views
I am not able to import the powershell module Microsoft.Graph.Entra.Beta
I am not able to import the powershell module Microsoft.Graph.Entra.Beta.
I want to use Set-EntraBetaTrustFrameworkPolicy module to upload xml configs to Azure AD B2C as per this microsoft doc : https:...
1
vote
1
answer
40
views
How to create dynamic groups in AzureAD/EntraID from a csv import?
I'm trying to create a number of dynamic groups from the department name attribute in AD, then create and add to a security group. This info would be in 2 columns in a csv (department and groupname).
...
0
votes
1
answer
33
views
How can I log the request headers of Invoke-MgRestMethod to inspect the Microsoft.Graph access token?
For debugging purposes, I want to inspect the access token obtained by calling Connect-MgGraph. As I don't see any direct support for this, I have tried to use Invoke-MgRestMethod to inspect to ...
0
votes
2
answers
49
views
Better way to deal with multiple foreach loops in Powershell?
Is there a better way in Powershell to handle multiple levels of returned values than nested foreach loops?
I need to get a list of each of our Azure Virtual Desktop session hosts for further ...
1
vote
0
answers
52
views
Azure Log Analytics - modern Custom Log Table - Using PowerShell to Ingest data via REST API with no DCE
Previously ingesting data into an Azure Log Analytics Log Table could be done without the need for a DCR (Data Collection Rule) or indeed a DCE (Data Collection Endpoint). In fact, this stack ...
0
votes
1
answer
78
views
Key vaults keys, secrets, and certificates PS script
I am trying to list all the keys, secrets, and certificates that are either expired or going to be expire in 20 days from multiple key vaults from multiple subscriptions but receiving the PS script ...
0
votes
1
answer
76
views
How to connect an Azure Share to a Windows Drive Letter
I have a connection string to an Azure Storage Share which looks like this:
DefaultEndpointsProtocol=https;
AccountName=myaccount;
AccountKey=xxx_LongEncryptedString_xxx;
EndpointSuffix=core....
0
votes
1
answer
112
views
Get-AzAccessToken tries to authenticate using federated credentials (OIDC token), despite having signed in using azure/login and enable-AzPSSession
I sign-in with Azure CLI and Azure PowerShell module using azure/login@v2 with enable-AzPSSession: true.
It works, and I'm able to deploy infrastructure using Bicep.
However, the Grant-ServiceAccess....
0
votes
1
answer
75
views
Can't assign Directory Readers role to managed identity using Az PowerShell: "Role Not Found" Error
I'm working on connecting to Microsoft Graph using a User Managed Identity (UMI). I've already created the managed identity in the Azure portal, but now I need to assign Directory Readers role to this ...
0
votes
1
answer
45
views
Get all Azure policy definitions related to customer managed keys using PowerShell or ArmClient
I want to automate the process of listing all policies in Azure that support Customer-managed keys for Azure Storage encryption.
Right now my current approach is to search for them in the Azure portal ...