2,924 questions with PowerShell-related tags

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

I want to use Get-ADUser to pull the "info" AD attribute, expand the property named info and export the data to a csv. How do I proceed?

I want to use Get-ADUser to pull the "info" AD attribute, expand the property named info and export the data to a csv. How do I proceed? For example, when I use this command: Get-ADUser * -Unlimited -Properties info | Select Name, info |…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-05-03T22:41:44.8833333+00:00
Zuph Elkanah 0 Reputation points
commented 2025-05-04T02:12:05.05+00:00
Zuph Elkanah 0 Reputation points
1 answer

Bulk license assign

need to bulk assign license with powershell for all unlicensed users

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2024-10-07T20:30:41.5166667+00:00
Lycee Francais 0 Reputation points
commented 2025-05-03T18:36:03.14+00:00
Jamil Roan 0 Reputation points
1 answer

how to fix pstools on my computer

why can't it run?

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-05-03T14:35:33.1466667+00:00
kimdat 0 Reputation points
answered 2025-05-03T15:00:06.6333333+00:00
Marcin Policht 44,850 Reputation points MVP
2 answers One of the answers was accepted by the question author.

How to run PowerShell with admin right

Hi, I need to run PowerShell with admin rights to get permission to run a script in C# code. If there is a solution please leave a comment, many thanks.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,103 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,431 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2023-03-27T04:15:40.04+00:00
365 timviec 45 Reputation points
commented 2025-05-03T12:49:37.39+00:00
poa 0 Reputation points
0 answers

How to completely uninstall WSL after failed installation?

Hi, I have tried to install WSL but the installation failed. I now would like to remove all partially installed parts of WSL to attempt a new, clean, installation. Now, when trying to enter any WSL command in the Windows PowerShell, I get "The…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-04-30T10:21:44.89+00:00
Sylvain Favresse 0 Reputation points
edited the question 2025-05-02T08:13:08.55+00:00
Sylvain Favresse 0 Reputation points
1 answer

Windows powershell keeps randomly opening for a split second..

Well the main issue is when i log into my pc after like 10-20 minutes. The windows powershell randomly opens up for a split second. this usually happens in every 20-30 minutes. I really dont know what thing is causing this issue? PLease somebody help me…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-04-24T06:21:15.81+00:00
Jaskirat Singh 0 Reputation points
edited an answer 2025-05-02T05:04:43.96+00:00
Henry Mai 75 Reputation points
0 answers

Export Status MFA (PowerShell- MgGraph)

I request your support, please. I need to obtain an export of all the tenant's users. I need to obtain the MFA status (Disabled, Enabled, Enforced). I previously used the MSOnline module, but it no longer allows me to use it. I believe it's discontinued.…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-05-01T21:07:22.53+00:00
GuestGuivenchi 105 Reputation points
edited the question 2025-05-02T01:39:27.42+00:00
GuestGuivenchi 105 Reputation points
0 answers

Filtering shared mailboxes from MgUser results

I have a tenant that has multiple brands, with each brand denoted by a domain. I am trying to put together a script to list the licenses for each user, including their brand name. This has been successful so far. The only thing I can't figure out is…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-05-01T23:20:59.4466667+00:00
Jon Covey 0 Reputation points
4 answers One of the answers was accepted by the question author.

How can I block a mass number of senders within Outlook Exchange?

I have an end user receiving massive amounts of spam messages from many addresses. In fact, they have over 4000 senders sending over 17000 messages. I need to block the sending addresses in in large quantities. Is there a way for me to upload a csv file…

Microsoft Exchange Online
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,872 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2024-08-13T11:33:31.4266667+00:00
Jeff Bird 20 Reputation points
commented 2025-05-01T13:15:04.44+00:00
S. Hanani 0 Reputation points
2 answers

How do I copy and paste a whole file structure within teams as well as the custom columns

I have made a teams channel with a file structure I want to use again and again. Along side the each folder is and columns with a single line of text explaining what needs to go in the folder, the relevant owner or owners and an incomplete / completed…

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,894 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,229 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-01-11T17:22:57.5833333+00:00
Jordan t 0 Reputation points
answered 2025-05-01T13:00:54.8566667+00:00
Deep Joshi 0 Reputation points
1 answer

Connect to ExchangeOnlineManagement powershell module returns error

Script is called from Workato, and runs from a virtual machine that has exchange online 3.6.0. This was working up until last week. UnAuthorized At C:\Program…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-04-25T19:04:17.0266667+00:00
KimH 5 Reputation points
answered 2025-05-01T11:30:24.39+00:00
Smith Pham 0 Reputation points
1 answer

Expired or Invalid pagination request

Write-ErrorMessage : Expired or Invalid pagination request. Default Expiry time is 00:30:00 At C:\Users\127079\AppData\Local\Temp\tmpEXO_nyok0szv.zqj\tmpEXO_nyok0szv.zqj.psm1:1189 char:13 Write-ErrorMessage $ErrorObject …

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-04-24T06:05:54.82+00:00
Rajeev Kumar 0 Reputation points
answered 2025-05-01T11:25:40.0333333+00:00
Smith Pham 0 Reputation points
1 answer

The term 'Copy-PnPList' is not recognized as the name of a cmdlet

I am facing below issue while using pnp-powershell with SharePoint Online: Copy-PnPList : The term 'Copy-PnPList' 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…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-04-22T16:07:10.2866667+00:00
Mukesh Patil 0 Reputation points
answered 2025-05-01T11:22:45.0766667+00:00
Smith Pham 0 Reputation points
1 answer

Power Query not importing all the Columns in a Worksheet

Hi, I'm using the Powerquery formula Excel.Workbook (File.Content) to connect to a folder that has a excel file with several worksheets in it. I'm then selecting the worksheet that I need to clean and get the required information to load in a Table. …

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2024-03-07T04:20:59.11+00:00
WestE 5 Reputation points
answered 2025-04-30T22:16:53.4866667+00:00
Lewis, Chris J 0 Reputation points
0 answers

Output Debug-StorageSyncServer -FileSyncErrorsReport to a file

I've tried > and *>, but when I run Debug-StorageSyncServer -FileSyncErrorsReport it just dumps it to standard out. Any…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-04-29T22:43:20.0366667+00:00
Dave Tapley 1 Reputation point
commented 2025-04-30T16:01:56.75+00:00
Rich Matheisen 47,786 Reputation points
1 answer One of the answers was accepted by the question author.

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,924 questions
asked 2025-03-13T21:21:43.6433333+00:00
Alexander Spitaler 20 Reputation points
commented 2025-04-30T11:12:29.6033333+00:00
Vaughn Williams 0 Reputation points Microsoft Employee
0 answers

Need to verify purged emails within the discoveryholds folder of user's archive mailbox

Need to verify purged emails within the discoveryholds folder of a user's archive mailbox. The emails have been purged and verified via purview to be in the discoveryhold folder in archive mailbox but cannot get a PS cmd to verify and show the email…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-04-29T18:24:14.29+00:00
Mena, Urilsido 0 Reputation points
1 answer

Script Not Running as Administrator on Single Account

the script is not being run as adminstrator when i am on the only provide account

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-04-28T10:36:37.4233333+00:00
鏡 ᴋʏᴀᴍɪツ 0 Reputation points
commented 2025-04-29T12:17:36.0533333+00:00
MotoX80 35,726 Reputation points
0 answers

How to run powershell script through PSF Json file in a MSIX packaging?

I need to create a shortcut under userprofile sendto folder through PSF +Json file in MSIX package. PowerShell script has created for shortcut creation and it is working manually as expected. But through json file , PowerShell script is not working due…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,924 questions
asked 2025-04-29T08:04:28.4733333+00:00
Anu Jaykumar 0 Reputation points
edited the question 2025-04-29T11:12:53.0666667+00:00
Anu Jaykumar 0 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,924 questions
asked 2024-05-29T13:34:46.4066667+00:00
Campbell, Joseph 0 Reputation points
commented 2025-04-28T21:42:54.41+00:00
Harm Veenstra 30 Reputation points MVP