2,502 questions with PowerShell-related tags

Sort by: Updated
1 answer

Storage Spaces - disk failure

Hello everyone! One of my disks in Storage Spaces suddenly failed, and it was simply impossible to keep it physically connected and boot the OS at the same time. So, I bought a new disk, swapped with the old one, and added it to the Pool in Storage…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-09-30T00:20:09.4266667+00:00
Jiri Mraz 0 Reputation points
edited the question 2024-10-03T21:22:59.3433333+00:00
KarishmaTiwari-MSFT 20,037 Reputation points Microsoft Employee
1 answer

How to set scope after connecting to Microsoft Graph using non-interactive method?

I've successfully connected to Microsoft Graph using non-interactive method (Client Id, Client Secret), but I'm receiving Insufficient privileges error when running Get-Mguser due to not setting the scope. I have tried running the commands mentioned in…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,995 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,668 questions
asked 2024-10-03T20:55:14.6966667+00:00
Sampath 0 Reputation points
answered 2024-10-03T21:07:58.64+00:00
Andy David - MVP 147.8K Reputation points MVP
0 answers

Runbook Error when trying to read table with VM power states, stoped VMs that are recorded as stop and deleting the rows after the fact.

This is an after updates update manager post-script to shut down vms after they are started for updates if they were off before pre-script. Thus, keeping the environment as it was before processing updates. This is also run on a portal.azure.com…

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,254 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-10-03T19:21:27.26+00:00
EDWARD REYESARROYO 25 Reputation points
commented 2024-10-03T20:44:31.6233333+00:00
Matthew Dowst 1 Reputation point
1 answer

Is it possible to get a PowerShell script that represents an operation in Azure Portal?

Hello, When I use Azure Portal and trigger some operation, like Deployment of Azure AI multiservice account, I would like to get a PowerShell script that represents that operation. Is that possible? In the "Overview" of the deployment operation…

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,254 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-08-07T13:13:23.27+00:00
DZIANIS DEV 0 Reputation points
commented 2024-10-03T17:41:40.38+00:00
Pranay Reddy Madireddy 15 Reputation points Microsoft Vendor
1 answer

Login error using powershell

I'm trying to run a script from local powershell but it giving me below error from today: The provided account "" does not have access to subscription name "<>". Please try logging in with different credentials or a different…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,668 questions
asked 2024-10-03T13:53:41.4766667+00:00
Varun Bhatia 0 Reputation points
answered 2024-10-03T15:13:32.1266667+00:00
Manu Philip 18,321 Reputation points MVP
3 answers One of the answers was accepted by the question author.

A Powershell Script to remove Microsoft Teams Classic

Anyone who can share a powershell script that will remove Microsoft Teams Classic? Current script i have is that it will detect if Teams classic is installed then it will proceed to remove. Check if Microsoft Teams Classic is installed $teamsClassic =…

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,082 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.
3,246 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-05-20T05:45:02.89+00:00
Bob Pendon 20 Reputation points
commented 2024-10-03T13:52:13.34+00:00
Jason MacDonald 0 Reputation points
1 answer One of the answers was accepted by the question author.

Add-PnPFile : Cannot contact site at the specified URL https://<<Customer Tenant>>.sharepoint.com/sites/Training. The app principal does not exist.

Hello Team, Getting error while executing Add-PnPFile command.  Add-PnPFile : Cannot contact site at the specified URL https://<<Customer Tenant>>.sharepoint.com/sites/Training. The app principal does not exist.   By going through some…

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,970 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-10-01T06:57:43.2366667+00:00
TCMS Admin 20 Reputation points
accepted 2024-10-03T07:10:30.1166667+00:00
TCMS Admin 20 Reputation points
1 answer

Task Scheduler is unable to fetch credentials from Windows Credential Manager. It’s returning null for the username and password

We have one Task Scheduler job using Credential Manager to store service account credentials(Generic). After a password change, we started facing this issue. We have a PowerShell script configured as a Task Scheduler job that uses Credential Manager to…

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,049 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,520 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-05-23T12:09:22.66+00:00
Ava Tomlinson 111 Reputation points
edited a comment 2024-10-03T05:53:45.8133333+00:00
RICHTER Salvador 0 Reputation points
1 answer

can't create app service with publish model "container" over Powershell

Hey guys, the last couple days I tried to write a powershell script which creates a azure app service and some deployment slots for it. First - it seems to work fine but later I realized that the publish model is "always" on "Code"…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,749 questions
asked 2024-09-27T11:44:57.1533333+00:00
Florian Bartsch 0 Reputation points
commented 2024-10-03T03:49:34.94+00:00
VenkateshDodda-MSFT 20,696 Reputation points Microsoft Employee
16 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.
11,566 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2023-03-21T19:12:59.2566667+00:00
Steve Lo 110 Reputation points
commented 2024-10-02T21:32:43.7466667+00:00
MossCro 1 Reputation point
1 answer

For all folders in both local drive and OneDrive 365 Home, how to list all files containing certain words and output their full pathnames into either Excel or text file?

For both local drive and OneDrive 365 Home, I need help to find all pdf files with names containing "ABC" and file content containing certain text The search results as follows: Full pathname of each file list format is either Excel rows…

OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
1,108 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-10-02T12:54:03.0266667+00:00
Sunny PA Wong 1 Reputation point
answered 2024-10-02T18:33:27.25+00:00
Rich Matheisen 46,636 Reputation points
1 answer

Connecting Security & Compliance PowerShell

I get this error msg, when trying to connect Security & Compliance PowerShell Could not find a part of the path 'C:\Users\username\AppData\Local\Temp\tmpEXO_5ewf3wn0.oir\exchange.format.ps1xml'. At…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-10-02T12:04:58.1866667+00:00
SauPom 156 Reputation points
answered 2024-10-02T15:35:24.23+00:00
Rich Matheisen 46,636 Reputation points
4 answers One of the answers was accepted by the question author.

AADSTS700016: Application with identifier <Id> was not found in the directory <Company>.

Good morning. I hope you are well. When trying to connect with: Connect-PnPOnline -Url "https://name-admin.sharepoint.com" -Interactive Or with: Connect-PnPOnline -Url "https://name-admin.sharepoint.com" It is throwing the…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,679 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-09-10T15:02:36.0733333+00:00
Jairo Javier Baleta Cali 211 Reputation points
commented 2024-10-02T11:35:45.58+00:00
Rob Nicholson 51 Reputation points
1 answer One of the answers was accepted by the question author.

New Azure VM RDP login displays powershell cant close to get to desktop

Created a new Azure VM for first time. Can RDP and login to the public IP. Set SConfig to not run, Powershell console stays open cant exit and get to desktop

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,547 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-10-02T03:38:55.21+00:00
Robot 25 Reputation points
accepted 2024-10-02T03:59:03.24+00:00
Robot 25 Reputation points
0 answers

Where can I find the complete list of all official GUID for all first-party Microsoft service principal?

Is there any way to create or generate a complete list of all official GUIDs for Microsoft Applications or services? So far I can only find it here:…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,995 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,873 questions
Microsoft Entra
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,668 questions
asked 2024-10-02T02:18:32.6466667+00:00
EnterpriseArchitect 5,376 Reputation points
edited the question 2024-10-02T02:19:58.2833333+00:00
EnterpriseArchitect 5,376 Reputation points
1 answer

Need script for Citrix workspace uninstallation

I want to uninstall Citrix Workspace on some machines that have different versions. Please suggest a script that can help me achieve this goa

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.
980 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
5,049 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-10-01T21:03:33.34+00:00
TechUST 516 Reputation points
answered 2024-10-02T02:11:38.77+00:00
AlexZhu-MSFT 5,871 Reputation points Microsoft Vendor
2 answers

unable to connect Azure

Hi All I use the below syntax to connect to Azure Powershell, but today i am unable to connect to azure powershell. it prompts me to enter tenant and subscription number. I have 1500 subscriptions, how can i know the subscription number for my…

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,520 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,668 questions
asked 2024-09-19T15:36:47.1233333+00:00
Glenn Maxwell 11,316 Reputation points
commented 2024-10-01T22:03:31.4666667+00:00
Raja Pothuraju 6,170 Reputation points Microsoft Vendor
0 answers

How to Exclude a User from Auditpol - Discovered a possible bug with auditpol.exe

Hello all, I am trying to exclude a user from being audited on a Server 2019 Domain Controller. Using the following: Auditpol /set /user:adm.svc.acc /subcategory:"Logon" /Success:disable Reason for doing so, it's a service account that is…

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,744 questions
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,378 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,515 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-10-01T03:22:54.2133333+00:00
muttBunch 100 Reputation points
edited the question 2024-10-01T16:47:44.62+00:00
muttBunch 100 Reputation points
0 answers

White screen while trying to use Azure cloud shell

Azure powershell is a white screen that i cant do anything with. I Disabled extentions for safari, deleted cache data, and reloaded the page, Safari is the newest version. I need to be able to use Azure Powershell, what could be the problem?

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-10-01T16:45:29.0566667+00:00
x 0 Reputation points
0 answers

Assign Calendar Privileges with Powershell

Im trying to assign Calendar Permissions to Owner and Member, Owner should have read&write while members only read. This is the code i came up with. the error i got was the following: Specified method is not supported. Status: 400…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-09-26T15:25:57.83+00:00
Lautaro Baumann 0 Reputation points
edited the question 2024-10-01T14:59:45.7433333+00:00
Lautaro Baumann 0 Reputation points