2,969 questions with PowerShell-related tags

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

convert ps1 to bat

Hey, Is this .ps1 script: Get-ScheduledTask -TaskPath "\Microsoft\Windows\WindowsUpdate\" | Disable-ScheduledTask Get-ScheduledTask -TaskPath "\Microsoft\Windows\WindowsUpdate\" | Unregister-ScheduledTask -Confirm:$False Exactly the…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-12T22:39:23.2666667+00:00
StewartBW 1,640 Reputation points
accepted 2025-06-14T13:14:09.8066667+00:00
StewartBW 1,640 Reputation points
0 answers

Error in the below code

Hi All, Could you identify what is the error in the below code. wget…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-13T06:42:22.0766667+00:00
Manideep Ramini 0 Reputation points
commented 2025-06-13T17:50:47.05+00:00
MotoX80 36,181 Reputation points
1 answer

Powershell Script

I have powershell script to get defender status for all servers using below command. Below command was successfull if I run the script manually but if we run this script using schedule task the script is running but no any result. Anyone know…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-04T07:48:23.2833333+00:00
Handian Sudianto 6,071 Reputation points
commented 2025-06-13T16:13:02.9833333+00:00
MotoX80 36,181 Reputation points
0 answers

Find Amortized Cost for Azure resources via PowerShell

Hello: I am trying to collect cost for Azure resources via Powershell. I have a script, but recently realized I am collecting actual, but not amortized cost. That means if any of my resources covered by Reserve Instance and/or Savings Plan I do not…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-13T12:57:44.5533333+00:00
olegarr 131 Reputation points
0 answers

⚠️Unable to enable the Real-time Protection in Windows Security

Microsoft Windows [Version 10.0.26100.4351] (c) Microsoft Corporation. All rights reserved. C:\Windows\System32>winmgmt /salvagerepository and WMI repository is consistent C:\Windows\System32>"C:\Program Files\Windows…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-13T08:13:58.13+00:00
Delfin Jay Dayunan 0 Reputation points
commented 2025-06-13T08:21:37.3033333+00:00
Delfin Jay Dayunan 0 Reputation points
2 answers

PowerShell Script Not Running from Task Scheduler

Hi All, I've created a short powershell script to check the following and send an email notification if any of these conditions are met: system rebooted in the last 'x' mins. zohoworkdrive background process is not running. Z: drive is not mapped or…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-11T21:47:19.5366667+00:00
Niranjan Thyagaraja 0 Reputation points
answered 2025-06-13T05:39:51.8133333+00:00
Olaf Helper 47,416 Reputation points
1 answer

Signed scripts in SCOM.

Hello everyone. I have SCOM 2016. On the servers for PowerShell scripts, the Execution Policy is set to All Signed. As I see it, SCOM sometimes creates temporary PowerShell scripts for checks itself, but they are not executed because they do not have a…

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,597 questions
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.
1,077 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2024-06-03T09:37:23.0533333+00:00
Vitaliy Ershov 10 Reputation points
commented 2025-06-12T23:59:37.3033333+00:00
Oggy Stoop 0 Reputation points
0 answers

"Activate" function with new-mgteam

We create teams for our school using Powershell. We used to use the Powershell command new-team for this. Now we use the Graph module with new-mgteam. Since we created the teams with new-mgteam, the teams no longer need to be activated by an owner, but…

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,894 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,685 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
4,034 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2023-11-14T14:56:32.9+00:00
Philipp Flury 10 Reputation points
commented 2025-06-12T23:45:35.2766667+00:00
Christian Dow 0 Reputation points
4 answers One of the answers was accepted by the question author.

PowerShell - Connecting to ExchangeOnline - Can no longer add/enable Remote Routing

First time posting, Last year I could use the following command on an account without issues (we are a hybrid migration of O365): Enable-RemoteMailbox TEST -RemoteRoutingAddress ******@OurDomain.mail.onmicrosoft.com -PrimarySmtpAddress…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-09T14:03:49.59+00:00
HoughtonJason-4020 50 Reputation points
commented 2025-06-12T17:32:56.5966667+00:00
HoughtonJason-4020 50 Reputation points
0 answers

WSL.exe Crashes in Administrator PowerShell with Offline Windows PC

Hello, I'm encountering an issue with WSL (Windows Subsystem for Linux) on my offline Windows 10 PC (Version 21H2, OS Build 19044.1288). When I run wsl from PowerShell (non-admin) it works fine, but when I run it from PowerShell as Administrator, it…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-12T14:18:54.2566667+00:00
Omer 0 Reputation points
2 answers One of the answers was accepted by the question author.

Using AZ CLI in a PowerShell Function App

I am trying to use the AZ CLI in a PowerShell Function App to automatically create a new Subscription each time a new client registers to use my services. It looks like I should be able to do it however, it is just not working. I have tried different…

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,867 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2023-06-21T02:39:45.63+00:00
Jonathan Lewis 20 Reputation points
commented 2025-06-12T10:38:16.66+00:00
Arvind Kumar 0 Reputation points
2 answers

$PSVersionTable.PSVersion command not working

Powershell cloud command $PSVersionTable.PSVersion is not working This question is related to the following Learning Module

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-11T14:49:54.1466667+00:00
mess iya 0 Reputation points
answered 2025-06-11T15:02:10.05+00:00
Michael Taylor 59,986 Reputation points
1 answer

When i'm trying to Connect-IPPSSession it is giving error

It is giving error WARNING: Your connection has been redirected to the following URI: "https://ps.compliance.protection.outlook.com/uc/PowerShell-LiveId" Connect-IPPSSession : Connecting to remote server ps.compliance.protection.outlook.com…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-05T09:15:49.3+00:00
Arunala Likitha Bhavana 0 Reputation points
edited the question 2025-06-11T13:55:16.1766667+00:00
kguntaka 6,410 Reputation points Microsoft External Staff Volunteer Moderator
0 answers

Unable to publish PBIX via REST API (400 Bad Request)

Hello! My name is Yevhenii, I am a BI developer currently exploring publishing Power BI reports using the REST API. I have encountered a persistent issue: I am unable to publish PBIX files via the REST API (POST /imports returns 400 Bad Request), even…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-06T17:25:31.77+00:00
Євген Фадєєв 0 Reputation points
commented 2025-06-10T18:33:53.1066667+00:00
Sampath 3,660 Reputation points Microsoft External Staff Moderator
0 answers

I want to bulk insert from blob-to-blob. where I am having files names text files

function Copy-AzureBlobWithFileList { param ( [string]$SourcePath, # e.g. https://account.blob.core.windows.net/container/folder?SAS [string]$DestPath, # e.g. https://account.blob.core.windows.net/container2/folder?SAS …

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-09T13:03:09.8966667+00:00
commented 2025-06-10T17:38:24.6666667+00:00
Sampath 3,660 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

Utilizing Remove-MgGroupMemberByRef to remove Specific user only from A group?

Hi People, After reading: https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.groups/remove-mggroupmemberbyref Due to the lack of examples and documentation, I need some help using the Remove-MgGroupMemberByRef cmdlet. I wanted to remove…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,685 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
24,961 questions
asked 2023-01-30T05:45:42.7733333+00:00
EnterpriseArchitect 5,976 Reputation points
commented 2025-06-10T16:30:59.25+00:00
Andrew Brooke 10 Reputation points
0 answers

BAT Files No Longer Open on Double-Click After Upgrading to Windows 11

After upgrading to Windows 11, .bat files no longer execute on double-click. Instead, nothing happens. Prior to the upgrade, these files opened and executed normally in Command Prompt. Here's what I have tried: Attempted to set cmd.exe as the default…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-10T07:36:57.0933333+00:00
Varghese, Amal 0 Reputation points
commented 2025-06-10T11:15:54.1633333+00:00
MotoX80 36,181 Reputation points
4 answers

Run Powershell Scripts in Notepad++

Hi, I would like to execute/run PowerShell Scripts from Notepad++ See article below, https://itecnote.com/tecnote/r-how-to-execute-a-powershell-script-from-notepad/ Is this something that can be achieved ? Or it's not supported....

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2023-05-11T20:02:20.7433333+00:00
Lai, Shi Peng 0 Reputation points
edited an answer 2025-06-09T09:16:42.4133333+00:00
João Mac-Cormick 0 Reputation points
1 answer

hyper v in windows powershell

i want to install hyper v from windows powershell for gaming.in control panel,in was not showing

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-06-07T07:14:30.7066667+00:00
Nimmagadda Shalem raj 0 Reputation points
answered 2025-06-07T07:57:39.2566667+00:00
S.Sengupta 24,201 Reputation points MVP
1 answer

Activate Azure benefit license for Azure Arc machines via Powershell or Azure Policy

Hi folks, is there a way to enable the Azure benefit license (Software Assurance) via Azure Policy or via Powershell? I only found some cmdlets/Policies for Azure Virtual Machines but not for Azure Arc Machines. Thanks

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
asked 2025-03-13T21:21:43.6433333+00:00
Alexander Spitaler 5 Reputation points
accepted 2025-06-06T09:32:08.3133333+00:00
Alexander Spitaler 5 Reputation points