2,331 questions with PowerShell-related tags

Sort by: Updated
1 answer

Automating switch between Standard HDD and Premium Disk on VMs

How can we have an automation that changes our VM's disk type to Standard HDD when we turn them off and then changes them to Premium before turning the VM back on? Is there any ready-to-use method available?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,588 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
603 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,196 questions
Azure Automanage
Azure Automanage
An Azure service that simplifies and optimizes the management of virtual machines with automated operations.
1 question
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-22T06:46:23.98+00:00
KindCompute-6524 85 Reputation points
edited an answer 2024-07-25T07:40:53.4866667+00:00
Prrudram-MSFT 23,211 Reputation points
1 answer

GPO script logOff is running with elevated permissions, can't run OneDrive correctly.

GPO script logOff is running with elevated permissions, can't run OneDrive correctly (it reports that it is not possible to run as administrator, even though I configured the policy in userconfiguration - windows settings - scripts LogOn\LogOff) How to…

OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
982 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-23T07:58:42.1966667+00:00
Станістав Ільїн 0 Reputation points
commented 2024-07-25T07:36:54.26+00:00
Станістав Ільїн 0 Reputation points
1 answer

The window closes automatically when connect to Exchange Online with PowerShell

In order to change some of the organization's settings, I entered these commands in PowerShell one after the other. I don't know if there was a successful connection to Exchange Online PowerShell. But as soon as the last command is lost, the PowerShell…

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,368 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,388 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-25T01:27:35.45+00:00
GRS 0 Reputation points
answered 2024-07-25T07:30:20.6733333+00:00
Alex Zhang-MSFT 0 Reputation points Microsoft Vendor
1 answer

Receiving "The SSL connection could not be established, see inner exception." on all Azure PowerShell cmdlets.

I am receiving the following error, regardless of the Azure PowerShell cmdlet that I am using. Again, it is for all azure cmdlets that I am receiving this SSL error message. My TLS is set to 1.2. About 1 out of every 3 Azure PowerShell cmdlets return…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-19T22:00:47.9533333+00:00
Jason Yoder 0 Reputation points
edited the question 2024-07-25T06:18:08.75+00:00
Rakesh Gurram 5,485 Reputation points Microsoft Vendor
2 answers

We cannot join User machine to EntraID

I need help understanding why we cannot join a device to our EntraID? The user has a good password and has EntraID Lic and a Intune Lic. We have used the DSregtool.ps1 and it claims we should be able to join. We have tried using the Settings/Accounts…

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,368 questions
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,200 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,743 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,633 questions
asked 2024-07-23T00:09:58.3833333+00:00
Jon Honhart 0 Reputation points
commented 2024-07-25T02:12:31.4+00:00
Crystal-MSFT 46,271 Reputation points Microsoft Vendor
0 answers

When trying to publish linux function app packages using Publish-AzWebApp powershell command it is not uploading.

I tried publishing app multiple times using bellow command on both windows and linux, it was working fine. However, from last few days after migrating function app from dotnet 6 isolated to dotnet 8 isolated it has stopped working for Linux Function App.…

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,681 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-22T15:56:38.4233333+00:00
Saburi Anil Nandankar 0 Reputation points
edited a comment 2024-07-24T16:58:53.9333333+00:00
Saburi Anil Nandankar 0 Reputation points
1 answer One of the answers was accepted by the question author.

"Set-Mailbox : A parameter cannot be found that matches parameter name 'UserCertificate'" when using Entra Application

Hello, I have a powershell script to do a manual bulk upload of S/MIME certificates to exchange online, but it needs me to authenticate as a domain admin interactively on every run: # Connect to Exchange-Online using your own Credentials Install-Module…

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,388 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,633 questions
asked 2024-07-24T13:49:24.6733333+00:00
Tim Niedermaier 20 Reputation points
accepted 2024-07-24T16:13:02.6533333+00:00
Tim Niedermaier 20 Reputation points
2 answers

Invoke-command Access denied on Windows 11 but works with Windows 10

I'm trying to connect to a remote computer using Invoke-Command while running an elevated Powershell ise. I recently upgraded to Windows 11 and my scripts no longer work and are giving me an Access is denied error. Here is a test script I've been using…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-23T15:56:09.5666667+00:00
Tyler L. Campbell 0 Reputation points
answered 2024-07-24T14:31:25.02+00:00
Tyler L. Campbell 0 Reputation points
1 answer

Automation runbook for start/stop VM using Storage account blob

Hi, I am trying to deploy a powershell runbook in automation account which should read contents of CSV stored in storage account blob using system assigned managed identity of automation account. Looking for a piece of code as I don't want to use sas…

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,944 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,196 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-17T06:57:19.4766667+00:00
WinTechie 286 Reputation points
commented 2024-07-24T06:20:56.88+00:00
Nehruji R 4,766 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

How to fix "403 forbidden" while trying to access MS Graph API during creation of User Flow using PowerShell or Bash in Azure AD B2C Tenant?

Hi all, I need help with API permissions for MS Graph API while creating User Flow using PowerShell.   Context: I am trying to create User Flow in Azure AD B2C tenant, but while trying to send Graph API requests using Invoke-MgGraphRequest command, I am…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,447 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,633 questions
asked 2024-07-23T13:09:04.6033333+00:00
Payel Ganguly 20 Reputation points Microsoft Employee
accepted 2024-07-24T05:59:17.88+00:00
Payel Ganguly 20 Reputation points Microsoft Employee
3 answers

Need a poweshell script to list all the SPO sites with the certain character in URL where the offline client availability is set to true

Need help with a powershell to list all the SPO sites where the offline client availability is set to true.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,301 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,810 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-19T05:36:13.67+00:00
Priya S 0 Reputation points
commented 2024-07-24T05:51:55.85+00:00
Priya S 0 Reputation points
1 answer One of the answers was accepted by the question author.

Getting of Notification Email using Powershell Script from Azure SAML Applications

How can we get the Notification Email (see image attached) using Powershell script in Microsoft Entra ID SAML applications whose certificates are near expiry within 60 days? Currently, we can get the Key Credentials of each SAML Applications, but we…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,633 questions
asked 2024-07-23T10:39:34.1+00:00
user20201 346 Reputation points
accepted 2024-07-24T02:15:09.5166667+00:00
user20201 346 Reputation points
0 answers

How to setup Azure Automation account to restore database on SQL MI ?

Hello, I have a PowerShell script (see below) that I currently run daily from a task scheduler on a VM to restore a production database (SQL Managed Instance) to a secondary instance (SQL Managed Instance). I am planning to move this process to an Azure…

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,366 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,196 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,633 questions
asked 2024-07-23T20:11:08.8833333+00:00
Anoop Noel Nakkala 0 Reputation points
2 answers One of the answers was accepted by the question author.

Trying to add Microsoft Sentinel to a Log Analytics Workspace in Azure but keep getting error "The gateway did not receive a response from 'Microsoft.SecurityInsights' within the specified time period"

I am trying to add Microsoft Sentinel to a Log Analytics Workspace connected to a Virtual Machine in the Azure portal but keep getting the error "The gateway did not receive a response from 'Microsoft.SecurityInsights' within the specified time…

Microsoft Sentinel
Microsoft Sentinel
A scalable, cloud-native solution for security information event management and security orchestration automated response. Previously known as Azure Sentinel.
1,065 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-06-27T04:27:49.0766667+00:00
Aaqib Ali 30 Reputation points
commented 2024-07-23T20:09:31.6233333+00:00
Craig Chambers 0 Reputation points
3 answers One of the answers was accepted by the question author.

Deleting Storage Account Pending Migration to SRP in Powershell

After much research on these forums and online in general, I'm trying to run the following two commands in attempt to delete a storage account that is pending migration to SRP: Move-AzureStorageAccount-Abort -StorageAccountName…

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,944 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-04-29T21:46:30.1633333+00:00
806572387 20 Reputation points
edited an answer 2024-07-23T19:04:16.5533333+00:00
Brad Vossler 0 Reputation points
0 answers

Real "files on demand". Automatically uploading cached OneDrive user files?

Hello, I recently came across a seemingly simple task, but in fact I have been unable to get OneDrive to do what I want it to do for two weeks now. I'll try to describe it briefly. The problem is that when a Windows user restarts or logs off their…

OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
982 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,997 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-16T15:13:32.9266667+00:00
Станістав Ільїн 0 Reputation points
commented 2024-07-23T07:53:44.5333333+00:00
Станістав Ільїн 0 Reputation points
2 answers

Exchange admin center bugs for manage email forwarding

I have set up the email forwarding in the Exchange Admin Center, where it is mentioned that "The mailbox owner will not be able to view and change this forwarding address." But I found that user logging into their mailbox can see which…

Microsoft Exchange Online
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-02T01:55:16.78+00:00
STKM2024 0 Reputation points
commented 2024-07-23T07:50:36.7666667+00:00
Xintao Qiao-MSFT 1,645 Reputation points Microsoft Vendor
1 answer

How can I troubleshoot issues connecting my "Powershell Onedrive Graph" API to Microsoft Graph Explorer for bulk exporting OneDrive photo URLs to Excel using a Microsoft 365 Business Basic license?

Please find below a screenshot of Microsoft Graph , Azur Api and MS365 license. Thank you, Regards,

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,368 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,447 questions
OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,198 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-21T18:45:19.02+00:00
Mo7Z 0 Reputation points
commented 2024-07-23T03:08:52.51+00:00
Yakun Huang-MSFT 2,645 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How to deploy KIR through script

Team, We have over 1000 assets managed by a third party RMM tool. The document here describes how to configure local groups manually through the GUI. Since we don't have GPO or Intune, we need a way to do this through CLI or a script. Please help us…

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,997 questions
Microsoft Intune Grouping
Microsoft Intune Grouping
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Grouping: The arrangement or formation of people or things in a group or groups.
48 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-15T14:11:14.04+00:00
Kishor Kumar 30 Reputation points
accepted 2024-07-22T13:50:40.21+00:00
Kishor Kumar 30 Reputation points
0 answers

Getting an error when trying to setup Exchange Online ForwardingAddress in Azure Runbook

Hello, I am trying to setup an Azure Automation Runbook in which I convert a User Mailbox to a Shared Mailbox and setup a ForwardingAddress. I setup all the permissions and converting the mailbox is working, setting a forwarding address throws the…

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,196 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
529 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-05-30T12:31:55.16+00:00
Nick 0 Reputation points
edited the question 2024-07-22T13:15:59.6033333+00:00
Nick 0 Reputation points