2,723 questions with PowerShell-related tags

Sort by: Updated
1 answer

How to specify a custom class as the data type for a PowerShell script parameter?

In Powershell (specifically 5.1), I have a custom class Foo, defined in a file (Foo.ps1 or Foo.psm1) like this: Class Foo { .... } And in a script (.ps1 file) I want to use this type for one of the parameters, e.g.: Param( [Foo] $Bar ... I would like to…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2025-01-09T17:49:25.4866667+00:00
THEOBALD K 20 Reputation points
commented 2025-01-10T20:28:12.81+00:00
Rich Matheisen 47,496 Reputation points
2 answers

AD RMS file bulk decryption using PowerShell

We’re in the process of trying to do a bulk decryption of Office files that were encrypted by AD RMS. We've identified a potentially effective PowerShell command, "Unprotect-RMSFile," that could address our decryption needs. We expected this…

Azure Information Protection
Azure Information Protection
An Azure service that is used to control and help secure email, documents, and sensitive data that are shared outside the company.
555 questions
SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,403 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,032 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,976 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2024-05-13T01:40:49.1666667+00:00
Premanan Rathakrishnan 0 Reputation points
answered 2025-01-10T16:39:02.99+00:00
Bruno Gomes 111 Reputation points
0 answers

How do I add tags in a name=value format to Service Principals to assist with automation?

I'm having trouble determining a clear answer on tagging Service Principals as the documentation seems to say you can't do it (https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/tag-support) while several github and other resources…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2025-01-10T16:33:45.6833333+00:00
ExtraLargeFork 1 Reputation point
1 answer

Get Directory roles which assigned to users (Eligible or active both)

Hi, I am working on to collect details of directory roles which are assigned on user and get that details by powershell cli and mggraph api. I have "Get-MgUserTransitiveMemberOfAsDirectoryRole -UserId " but that is providing me only roles…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,748 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,792 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
Microsoft Entra Private Access
Microsoft Entra Private Access
Microsoft Entra Private Access provides secure and deep identity-aware, Zero Trust network access to all private apps and resources.
74 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,802 questions
asked 2025-01-10T09:20:54.9333333+00:00
VJ 25 Reputation points
answered 2025-01-10T16:21:28.4033333+00:00
Vasil Michev 111.6K Reputation points MVP
2 answers One of the answers was accepted by the question author.

How can I get my SharePoint Online Management Module working in PowerShell?

(1) Trying to run any SPO command getting: Connect-SPOService : The term 'Connect-SPOService' 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…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,032 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2023-05-01T13:06:48.1533333+00:00
Rose Fletcher 25 Reputation points
commented 2025-01-10T11:51:01.6233333+00:00
SLIWINSKI, Piotr 3540 10 Reputation points
3 answers

How do we fix 0x8a15000f : Data required by the source is missing?

I Am trying to run winget on a widows 11 pc and keep getting the error 0x8a15000f : Data required by the source is missing. Have done update reset and still get the issue with the same error.

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2024-05-29T13:34:46.4066667+00:00
Campbell, Joseph 0 Reputation points
commented 2025-01-10T10:30:03.02+00:00
Andre 0 Reputation points
1 answer

How to fix ClientCertificateCredential authentication failed:

I am getting this error on some Pipelines that I have inherited from a now departed colleague, I am unsure exactly how to fix this issue. Does anyone have any experience with this issue and a solution? ClientCertificateCredential authentication failed:…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,802 questions
asked 2025-01-06T00:14:14.23+00:00
Rustin Davitt 0 Reputation points
commented 2025-01-10T07:55:22.18+00:00
Raja Pothuraju 10,760 Reputation points Microsoft Vendor
1 answer

Testing APIM API is giving null response when 200 ok

Hi Team, We have multiple APIs managed by APIM when test APIs by powershell it returns null response for 200 status code but we could see these there is some response for 401s. What could be the reason and how to fix it. Thanks venkatesh.k

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,247 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2025-01-07T16:09:13.5466667+00:00
Venkatesh Korrapati 0 Reputation points
commented 2025-01-10T07:16:34.8633333+00:00
Shireesha Eeraboina (Quadrant Resource LLC) 575 Reputation points Microsoft Vendor
1 answer

New-AzApiManagementSubscription doesn't seems to work

Hi, I try to use in my Pwoershell script command : New-AzApiManagementSubscription to create a sunscription and add it to a Prodcut, but when I try it with different paramaters/syntax: CreateResult = New-AzApiManagementSubscription ` -Context…

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,247 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2024-12-19T09:51:27.47+00:00
Eric Franckx 50 Reputation points
commented 2025-01-10T05:25:23.3033333+00:00
VenkateshDodda-MSFT 23,431 Reputation points Microsoft Employee
1 answer

How to schedule on Azure to run a powershell script on different VMs in specific hours.

Hi. I need to run a PowerShell script in different servers and different hours for each VMs. For exemple, Server A must run at 3pm, Server B must run at 5pm and Server C must run at 11am. I can run the PowerShell script successfully on "Run…

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,219 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,288 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,522 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,598 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2024-12-27T22:19:26.7933333+00:00
Marcus Assis 0 Reputation points
answered 2025-01-10T03:46:23.3033333+00:00
Leo Visser 91 Reputation points MVP
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,723 questions
asked 2024-04-17T14:51:12.7466667+00:00
Swahela Mulla 95 Reputation points
commented 2025-01-09T14:45:31.2066667+00:00
Rishit Madhav 0 Reputation points
2 answers

SharePoint Online: Find Duplicate Documents using PowerShell

Could someone post a working script for getting a list of duplicate files in Sharepoint Online? The scripts formerly posted no longer work.

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.
3,179 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2025-01-07T17:04:14.4366667+00:00
44785390 0 Reputation points
commented 2025-01-09T05:16:54.48+00:00
Ling Zhou_MSFT 20,165 Reputation points Microsoft Vendor
2 answers

Why does Windows Powershell represent datetime values in 24h format when using string interpolation?

Edit: for clarity. Initial example was potentially confusing. Why does Windows Powershell output datetime values in 24h format when using string interpolation but follows my culture settings and outputs as 12h when referencing it explicitly? I'm…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2025-01-04T01:48:19.5333333+00:00
McDonald, Matthew 221 Reputation points
commented 2025-01-09T03:51:47.9533333+00:00
Rich Matheisen 47,496 Reputation points
0 answers

Connect-PnPonline 404 Not Found Issue

I used connect-pnponline -url https://tenant.sharepoint.com/sites/contoso -Interactive -ClientId "XXX-XXXX-XXXXX-XXXXXX-XXXXX -Verbose It shows that I'm connected, but I get this error message. Get-PnPSite: The remote server returned an error: (404)…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2025-01-09T03:29:54.5966667+00:00
Just Learning 0 Reputation points
edited the question 2025-01-09T03:32:27.18+00:00
Just Learning 0 Reputation points
1 answer

Best Approach to Block Incoming Traffic During Initial Cache Loading in Azure VMSS

I am setting up a VMSS (Virtual Machine Scale Set) for a web application, and I need to perform an initial load of objects into the cache. To achieve this, I would like to open a web page on localhost to load the objects into the cache, but I don't want…

Azure Web Application Firewall
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
466 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2024-12-22T15:42:48.31+00:00
ShlomiDror-7850 0 Reputation points
edited the question 2025-01-07T13:19:18.1666667+00:00
Srinud 3,470 Reputation points Microsoft Vendor
1 answer

Assistance Needed with OneDrive and Office 365 Activity PowerShell Scripts

Dear All, I am using the scripts below to retrieve OneDrive and Office 365 activity details for my tenant. However, in the "User Principal Name" field, I am getting an ID instead of the email address. This issue started recently prior to that,…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,748 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
1,249 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,598 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2024-11-25T08:33:02.72+00:00
Ameer 11 Reputation points
answered 2025-01-07T10:10:51.13+00:00
Rajat Vashistha-MSFT 90 Reputation points Microsoft Vendor
1 answer

How to get Get-TeamsProtectionPolicy function to use with Microsoft 365, since I'm getting an Exchange path error when trying to import the ExchangePowerShell module?

Hello all, I'm using PowerShell version 5.1.26100.2161 in case that's relevant. What I'm trying to do: I'm trying to use the PowerShell functions Get-TeamsProtectionPolicy and Get-TeamsProtectionPolicyRule to view a company's Teams protection policy…

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.
5,452 questions
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,631 questions
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,682 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2024-12-31T16:36:34.5566667+00:00
Brett 0 Reputation points
commented 2025-01-07T09:44:16.09+00:00
Xintao Qiao-MSFT 5,630 Reputation points Microsoft Vendor
2 answers

App-only authentication for unattended scripts

Hi Team, We are developing an integration that will use the authentication (App-only authentication for unattended scripts) mechanism to integrate with Security & Compliance PowerShell. The article…

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,723 questions
asked 2024-12-23T07:49:50.55+00:00
Abd El-aziem, Ahmed Saeed 0 Reputation points
commented 2025-01-07T02:19:31.66+00:00
Jake Zhang-MSFT 8,010 Reputation points Microsoft Vendor
0 answers

How to Install PIP for Python on Windows 11?

What are the steps to install PIP for Python on Windows 11? The goal is to use Python with Microsoft Excel and, if possible, replace VBA entirely.

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,141 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2025-01-05T20:35:26.89+00:00
edited the question 2025-01-06T04:42:55.1033333+00:00
Prasad-MSFT 7,631 Reputation points Microsoft Vendor
1 answer

How do get this command to return the results I need

First and foremost I am not a programmer, so scripting is hard for me. I have been tasked with creating dynamic distribution lists, while there is a GUI option in AAD it is not allowing for the granularity that we are seeking. We need the list to not…

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,598 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,723 questions
asked 2025-01-03T15:34:09.4+00:00
cdsrm43 0 Reputation points
answered 2025-01-03T20:20:48.6033333+00:00
Rich Matheisen 47,496 Reputation points