2,328 questions with PowerShell-related tags

Sort by: Updated
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,328 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,942 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,328 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,444 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,328 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,623 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,289 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,808 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,328 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,328 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,623 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,354 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,328 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,623 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,328 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,942 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,328 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.
980 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,986 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,328 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,328 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,560 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,358 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,444 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,328 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,570 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,986 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,328 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,328 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
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,289 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,462 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,328 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,444 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,328 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,910 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,986 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,328 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,328 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,716 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,328 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,328 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,385 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,328 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