2,096 questions with PowerShell-related tags

Sort by: Updated
6 answers One of the answers was accepted by the question author.

Why can't I use Invoke-WebRequest twice?

Hi All, I need to rely on the first Invoke-WebRequest to piece together a URL for the second Invoke-WebRequest, but the second time is forcibly terminated. My Script: Import-Module -ErrorAction Stop…

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,387 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2023-03-25T04:01:16.9866667+00:00
Hsieh, Iverson 65 Reputation points
commented 2024-05-07T01:28:12.0166667+00:00
Hsieh, Iverson 65 Reputation points
2 answers

How to get list of all attribute in AD

Hello, How To get list of all attribute in AD(default and custom attribute ) in csv file. Thanks Rich

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,925 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,387 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-04-19T11:35:32.11+00:00
Richa Kumari 286 Reputation points
commented 2024-05-07T01:10:36.27+00:00
Neuvi Jiang 5 Reputation points Microsoft Vendor
2 answers

How to launch Microsoft Edge to a specific Workspace?

How can I launch Microsoft Edge directly to a specific shared Edge Workspace, ie what is the command line switch? Preferably I would like to launch two workspaces at once; more preferably I would like to launch them on to the last desktop region that…

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,149 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2023-09-11T09:44:11.8766667+00:00
Paul Jefferies 15 Reputation points
commented 2024-05-06T20:40:49.76+00:00
Christopher Mak 0 Reputation points
1 answer One of the answers was accepted by the question author.

How can I get list of runbooks that uses a particular Database using PowerShell in a runbook

Hi , we have created plenty of runbooks to load data to our SQL warehouse. and the runbooks are keep increasing due to business need. we are in need of achieving particular task. that requires list of runbooks that is using the specific xyz database.…

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,131 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-04-04T04:56:48.8866667+00:00
Ponkam, Sumanth (Cognizant) 25 Reputation points
edited a comment 2024-05-06T17:20:19.0366667+00:00
Ponkam, Sumanth (Cognizant) 25 Reputation points
1 answer

Why "Request administrator consent" if it has already consented?

I would like to migrate my PowerShell reporting script from using MSOnline module to Microsoft.Graph equivalent. Whenever I launch Connect-MgGraph -Scopes "User.Read.All" I get stuck with the following Request administrator consent…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,707 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-05-06T14:35:48.9033333+00:00
Dario Corrada 0 Reputation points
answered 2024-05-06T16:03:00.73+00:00
Vasil Michev 95,836 Reputation points MVP
3 answers One of the answers was accepted by the question author.

SCOM 2019 R2 Powershell script monitor not running

I have SCOM2019 and I have problems running my scripts in PowerShell. I can't find the website: https://gallery.technet.microsoft.com/Sample-Management-Pack-17b76379. Where can I find this Management-Pack. Error: Script or Executable Failed to run

Microsoft System Center
Microsoft System Center
A suite of Microsoft systems management products that offer solutions for managing datacenter resources, private clouds, and client devices.
840 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-05-06T12:47:22.1833333+00:00
Fabio Brandao 20 Reputation points
commented 2024-05-06T14:46:24.0266667+00:00
MotoX80 32,076 Reputation points
3 answers

How to retrieve CPU and memory metrics for all Azure App Services

I am trying to retrieve CPU and memory metrics (Max, Min, Avg) for all App Services in a specific Azure subscription: # Connect to Azure account Connect-AzAccount -UseDeviceAuthentication # Specify the subscription ID …

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,820 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,945 questions
asked 2023-06-29T18:33:20.7133333+00:00
MoTaar 310 Reputation points
edited an answer 2024-05-06T11:53:52.7933333+00:00
Balakrishna Patibandla 0 Reputation points
2 answers One of the answers was accepted by the question author.

'Get-AtpPolicyForO365' is not recognized as the name of a cmdlet.

Get-AtpPolicyForO365 : The term 'Get-AtpPolicyForO365' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,  verify that the path is correct and try again. Using…

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,204 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-05-04T04:22:11.51+00:00
Prasanth J.k 40 Reputation points
accepted 2024-05-06T10:41:37.48+00:00
Prasanth J.k 40 Reputation points
15 answers

High CPU usage for vmmem

Hi, I have experienced high CPU usage for Vmmem frequently (~every 2days) and the only solution at the moment is simply restart my machine. It is understood that is related to WSL and I do have a Docker image running on Ubuntu on Windows. However it is…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,689 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2023-03-21T19:12:59.2566667+00:00
Steve Lo 100 Reputation points
edited a comment 2024-05-06T09:16:20.6333333+00:00
Samia, Michel 0 Reputation points
1 answer

Powershell Script to temporarily activate PIM with MFA?

Hello Everyone I am trying to write a script that temporarily activated a PIM Role to my account...the issue is, that my account is secured with MFA, so this does not work: $roleDisplayName = "License Administrator" $roleDefinitionID =…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,640 questions
asked 2024-05-03T13:10:03.2133333+00:00
Bühler Gabriel 71 Reputation points
answered 2024-05-06T07:10:38.3733333+00:00
Thangaraj Lakshmanan 90 Reputation points
1 answer

Issue adding new owner to Outlook shared calendar

Trying to add a new owner to a shared mailbox as the option is not longer available in Outlook application. Using PowerShell command Add-MailboxFolderPermission -Identity sourceuser.ac.uk:\calendar\ma_test -User destinationuser.ac.uk -AccessRights…

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,204 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-04-19T16:04:11.3566667+00:00
Mario Cleovoulou 0 Reputation points
edited the question 2024-05-06T05:33:03.89+00:00
Jake Zhang-MSFT 1,235 Reputation points Microsoft Vendor
0 answers

issue fixed

issue fixed

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-05-03T12:10:17.7266667+00:00
Azuretech 90 Reputation points
edited the question 2024-05-06T04:23:27.82+00:00
SwathiDhanwada-MSFT 17,726 Reputation points
1 answer

How to automate turning off or suspending some Azure services to save money?

What Azure objects can we suspend or turn off outside business hours to save running costs? App Service: The app service implements the message compose experience in the team tab and the messaging endpoint for the bot. Service Bus: The individual…

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
2,068 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,707 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,131 questions
Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
798 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-05-05T13:46:36.69+00:00
EnterpriseArchitect 4,826 Reputation points
edited an answer 2024-05-05T14:46:41.47+00:00
Sina Salam 3,886 Reputation points
0 answers

Is it possible to programmatically select folders in a library from displaying or not in OneDrive

Good Afternoon, Does anyone know if it's programmatically possible to develop a script where it would be able to turn 'on' or 'off' (to make visible or not) the folders in a user's OneDrive sync from a SharePoint Library? As shown here: I suspect that…

OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
837 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,728 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-05-03T20:17:59.3933333+00:00
Rohman, William T 20 Reputation points
0 answers

Unlink OneDrive account from PC

Hi Team, Is there a way to automate the process of unlinking of OneDrive account? As for 1-2 accounts, we perform manual steps: open the OneDrive settings, go to the account tab, and click Unlink this PC. But for thousands Laptops/desktop we don’t want…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-05-03T09:54:21.8133333+00:00
Prabhjot Singh 145 Reputation points
2 answers

How to get the SQL Server version details (CU) install in sql server VM from cloud shell?

Hi, What are the options available to get SQL server versions(CU) install in SQL Server VM. THis is needed to maintain the wiki package for multiple vm across the multiple environment, I have tried $serverName =…

SQL Server on Azure Virtual Machines
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-05-02T10:58:37.3566667+00:00
Ummer, Fazil 0 Reputation points
answered 2024-05-03T08:35:32.74+00:00
ShaktiSingh-MSFT 13,751 Reputation points Microsoft Employee
2 answers

Windows Powershell and Visual Studio Running Extremely Slow

Hello, I work as an IT support engineer for my company and a user reached out to me saying that they have been experiencing issues with their VS code and Powershell commands running very slow. I recreated the same environment on my laptop, and I had the…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,637 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,268 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,387 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-04-24T19:29:34.0733333+00:00
Daniel Bulakh 15 Reputation points
commented 2024-05-03T07:29:38.4166667+00:00
Tianyu Sun-MSFT 27,431 Reputation points Microsoft Vendor
1 answer

Change Product Key of Windows Server 2022 using Ansible and/or PowerShell script

Hi there, I am trying to automate the process of provisioning a Windows Server based Virtual Machine using Azure and Ansible. My company has some Windows Server product keys available through the Microsoft Partner Program. My goal is to use one of these…

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,185 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,200 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,387 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-04-30T07:44:01.64+00:00
Erik Burmester 0 Reputation points
commented 2024-05-03T05:56:18.8433333+00:00
Nehruji R 2,126 Reputation points Microsoft Vendor
0 answers

How to execute System.Windows.Forms as ServiceNotification or DefaultDesktopOnly

We are working on the PowerShell to Pop out message forms to the user Accounts and we are using Add-Type -AssemblyName System.Windows.Forms to create the user interactive messages. We are currently using the SCCM to deploy the PowerShell script across…

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,268 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-05-02T17:09:58.89+00:00
Prabhjot Singh 145 Reputation points
commented 2024-05-03T04:47:33.6433333+00:00
Prabhjot Singh 145 Reputation points
2 answers

How to download group report in MIM system. Using powershell command or is there other way to download the data.

Hello all, How to download group report. Including Displayed Owner, Owner, alias, Account Name, Display Name, Members. Is there powershell script? Thank you.

Microsoft Identity Manager
Microsoft Identity Manager
A family of Microsoft products that manage a user's digital identity using identity synchronization, certificate management, and user provisioning.
621 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,096 questions
asked 2024-02-01T08:46:09.1066667+00:00
commented 2024-05-02T23:15:37.6533333+00:00
Pat Nish 0 Reputation points