2,323 questions with PowerShell-related tags

Sort by: Updated
0 answers

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,575 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,195 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,323 questions
asked 2024-07-22T06:46:23.98+00:00
KindCompute-6524 85 Reputation points
commented 2024-07-23T07:38:15.82+00:00
Prrudram-MSFT 23,131 Reputation points
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,349 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,421 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,197 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 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,495 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,975 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,323 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,195 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.
528 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 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
2 answers

Disk is not visible in portal

Hello Everyone. I am trying to add one OS disk as data disk into my vm using powershell. I am able to update the vm. after this it is not showing in portal. are we need to add manually. I want to reduce this efforts as well. I really appreciate for…

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
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-07-20T13:15:23.9733333+00:00
Mohsin Khan 45 Reputation points
answered 2024-07-22T11:52:06.2433333+00:00
Nehruji R 4,691 Reputation points Microsoft Vendor
1 answer

Invoke-PnPTenantTemplate is not performing any action.. "Access token acquired"

I have 2 SharePoint Online tenants which both have a modern communication sites. now i used this command to get the source site template:- PS C:\Users\mohan> Connect-PnPOnline -Url "https://ssms.sharepoint.com/sites/PPM-test/"…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,274 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,460 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-07-17T18:01:50.68+00:00
john john Pter 155 Reputation points
commented 2024-07-22T08:35:26.88+00:00
RaytheonXie_MSFT 33,641 Reputation points Microsoft Vendor
2 answers

What is the UserID required by Get-MgUserContact?

According to the documentation, Get-MgUserContact requires either a UPN or a UserId in the -UserId field. However, mail contacts don't have UPNs, and the documentation doesn't define what a mail contact's UserID is. I've tried email address, display…

Microsoft Exchange Online
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,421 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-07-01T21:34:31.9933333+00:00
JayCarper-5747 216 Reputation points
commented 2024-07-22T05:58:58.23+00:00
Bruce Jing-MSFT 2,835 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,323 questions
ASP.NET Core Training
ASP.NET Core Training
ASP.NET Core: A set of technologies in the .NET Framework for building web applications and XML web services.Training: Instruction to develop new skills.
19 questions
asked 2024-07-19T22:00:47.9533333+00:00
Jason Yoder 0 Reputation points
edited the question 2024-07-22T02:12:41.7766667+00:00
AmaranS 3,865 Reputation points Microsoft Vendor
1 answer

i need help to delete the additional root folders i created

Hello. so i made the big mistakes of creating root folders and files and i need help to delete them so basically i was trying to code a node and java file and i didnt thought of what permissions im giving to the VS code and about 1 or 2 hours later i…

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,975 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-07-19T11:00:57.8933333+00:00
Gogol King 0 Reputation points
answered 2024-07-21T22:20:34.3533333+00:00
Jacen Wang 0 Reputation points Microsoft Vendor
1 answer

Restore a SQL Server backup to Azure SQL Managed Instance

What is the best way to restore an SQL Server backup file (.bak) from a storage container to Azure SQL Managed Instance, and overwrite the existing database with the backup? I am looking for the appropriate PowerShell Az command to accomplish this task.…

Azure SQL Database
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-01-27T08:11:08.8433333+00:00
PS 396 Reputation points
commented 2024-07-21T10:12:19.46+00:00
Vinodh247 13,626 Reputation points
2 answers

Discrepancy in Windows Form Appearance between PowerShell ISE and PowerShell

Hello Everyone, I've encountered an issue with the appearance of a Windows Form created using PowerShell. When running the script within PowerShell ISE, the form displays correctly with clear fonts and the expected size. However, when running the same…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-04-17T14:51:12.7466667+00:00
Swahela Mulla 90 Reputation points
edited an answer 2024-07-21T08:44:03.74+00:00
Prabhakaran Setti 0 Reputation points
1 answer

Help with PowerShell - remove an attribute value if a user is not in all 4 groups

Hi, I am hoping to get some suggestions on how to do this. There are 4 defined groups. I need to get a list of AD users that have adminCount = 1 Then I need to compare. If a user is not in all 4 groups (not just 1 group), then remove the adminCount. This…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-07-19T22:26:40.6633333+00:00
M Tran 486 Reputation points
answered 2024-07-19T23:14:27.68+00:00
Marcin Policht 18,185 Reputation points MVP
2 answers One of the answers was accepted by the question author.

Runtime Exception When Using Set-OrganizationConfig

Trying to run Set-OrganizationConfig cmdlet in powershell EXO V3 module returns runtime exception: "unable to find type [uint]". Has anyone had this error before and know of a potential solution? I cannot find anything online to reference…

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,383 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-07-17T11:36:20.5+00:00
Rhys Pickett 40 Reputation points
commented 2024-07-19T16:35:39.89+00:00
Matthew Trembly 51 Reputation points
1 answer

Powershell Script exporting MFA status and licence skuid

Hi all. I'm new to powershell and have been attempting to understanding some of the scripts readily available from the multitude of sources found by google. My objective is to export a list of licensed users, what their licenses are, and their MFA…

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,349 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-02-13T16:57:54.42+00:00
Owen Cheung 25 Reputation points
edited a comment 2024-07-19T14:46:17.0533333+00:00
Robert Kahler 1 Reputation point
2 answers One of the answers was accepted by the question author.

IF statement not functioning in Azure runbook

I have a runbook with a PowerShell if statement to check if the input value of a received MAC address is in a valid format. If the format is not valid I am running a cmdlet which calls a function to update the MAC address and use the updated MAC. Else if…

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,195 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-07-09T14:06:43.48+00:00
DW_FL 41 Reputation points
commented 2024-07-19T11:32:46.6133333+00:00
Mahesh Goud Juvvadi 940 Reputation points Microsoft Vendor
1 answer

Power shell script to create excel file and load data by query

Hi, Please help me to get a powershell script to generate a excel file and send by DB mail. regards,

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,184 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2023-05-11T12:51:26.6966667+00:00
SVA 116 Reputation points
commented 2024-07-19T11:05:55.4366667+00:00
Osama Ibrahim 0 Reputation points
0 answers

Retrieving task details from Migration Manager (Fileshare Migration) no longer work via Powershell

https://learn.microsoft.com/en-us/sharepointmigration/mm-reports#download-detailed-task-level-reports-via-powershell in the Function GetAlltasks there no longer retrieve Data from MS Graph and it gives no error Message so the Script get error, that no…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,421 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-07-19T09:51:24.4666667+00:00
Ilkiz, Heiko 20 Reputation points
1 answer

PowerShell Filter

Hello, I have powershell script like below output. The result is fine but when i want to filter only showing Type="Vmware Backup" and only to show "Job Name" and "Last Result" columns why i not get the result? Something…

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,460 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-07-19T06:39:27.7333333+00:00
Handian Sudianto 4,511 Reputation points
answered 2024-07-19T07:38:43.04+00:00
Andreas Baumgarten 103.9K Reputation points MVP
1 answer

Azue runbook - Exchange PowerShell

We are trying to automate mail flow reporting via Azure runbooks using an app registration (service principal) to authenticate. The runbook will query Exhchange Online powershell modules for mailflow data. The only Entra permissions that seem to allow…

Microsoft Exchange Online
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,421 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,195 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-07-12T14:18:19.4366667+00:00
Daniel Birrell 41 Reputation points
commented 2024-07-19T05:32:57.25+00:00
Noah Ma-MSFT 2,340 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Check Internet Connectivity using Powershell

Hello, I want to make a powershell script to test is the server have internet connectivity or not by doing ICMP to 8.8.8.8 for example and the script will return 1 if get reply and 0 if not get the reply. Anyone know here how to make that script?

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,460 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,323 questions
asked 2024-07-19T00:53:03.6533333+00:00
Handian Sudianto 4,511 Reputation points
accepted 2024-07-19T03:03:09.7233333+00:00
Handian Sudianto 4,511 Reputation points