2,331 questions with PowerShell-related tags

Sort by: Updated
1 answer

Invoke-PnPTenantTemplate is not performing any action.. "Access token acquired"

I have 2 SharePoint Online tenants which both have a modern communication sites. now i used this command to get the source site template:- PS C:\Users\mohan> Connect-PnPOnline -Url "https://ssms.sharepoint.com/sites/PPM-test/"…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,301 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,463 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-17T18:01:50.68+00:00
john john Pter 155 Reputation points
commented 2024-07-22T08:35:26.88+00:00
RaytheonXie_MSFT 33,641 Reputation points Microsoft Vendor
2 answers

What is the UserID required by Get-MgUserContact?

According to the documentation, Get-MgUserContact requires either a UPN or a UserId in the -UserId field. However, mail contacts don't have UPNs, and the documentation doesn't define what a mail contact's UserID is. I've tried email address, display…

Microsoft Exchange Online
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,447 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-01T21:34:31.9933333+00:00
JayCarper-5747 216 Reputation points
commented 2024-07-22T05:58:58.23+00:00
Bruce Jing-MSFT 2,910 Reputation points Microsoft Vendor
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,331 questions
asked 2024-04-17T14:51:12.7466667+00:00
Swahela Mulla 90 Reputation points
edited an answer 2024-07-21T08:44:03.74+00:00
Prabhakaran Setti 0 Reputation points
2 answers One of the answers was accepted by the question author.

Runtime Exception When Using Set-OrganizationConfig

Trying to run Set-OrganizationConfig cmdlet in powershell EXO V3 module returns runtime exception: "unable to find type [uint]". Has anyone had this error before and know of a potential solution? I cannot find anything online to reference…

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,388 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-17T11:36:20.5+00:00
Rhys Pickett 40 Reputation points
commented 2024-07-19T16:35:39.89+00:00
Matthew Trembly 51 Reputation points
1 answer

Powershell Script exporting MFA status and licence skuid

Hi all. I'm new to powershell and have been attempting to understanding some of the scripts readily available from the multitude of sources found by google. My objective is to export a list of licensed users, what their licenses are, and their MFA…

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.
4,368 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-02-13T16:57:54.42+00:00
Owen Cheung 25 Reputation points
edited a comment 2024-07-19T14:46:17.0533333+00:00
Robert Kahler 1 Reputation point
2 answers One of the answers was accepted by the question author.

IF statement not functioning in Azure runbook

I have a runbook with a PowerShell if statement to check if the input value of a received MAC address is in a valid format. If the format is not valid I am running a cmdlet which calls a function to update the MAC address and use the updated MAC. Else if…

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,196 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-09T14:06:43.48+00:00
DW_FL 41 Reputation points
commented 2024-07-19T11:32:46.6133333+00:00
Mahesh Goud Juvvadi 940 Reputation points Microsoft Vendor
1 answer

Power shell script to create excel file and load data by query

Hi, Please help me to get a powershell script to generate a excel file and send by DB mail. regards,

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,200 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2023-05-11T12:51:26.6966667+00:00
SVA 116 Reputation points
commented 2024-07-19T11:05:55.4366667+00:00
Osama Ibrahim 0 Reputation points
0 answers

Retrieving task details from Migration Manager (Fileshare Migration) no longer work via Powershell

https://learn.microsoft.com/en-us/sharepointmigration/mm-reports#download-detailed-task-level-reports-via-powershell in the Function GetAlltasks there no longer retrieve Data from MS Graph and it gives no error Message so the Script get error, that no…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,447 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-19T09:51:24.4666667+00:00
Ilkiz, Heiko 20 Reputation points
1 answer

PowerShell Filter

Hello, I have powershell script like below output. The result is fine but when i want to filter only showing Type="Vmware Backup" and only to show "Job Name" and "Last Result" columns why i not get the result? Something…

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,463 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-19T06:39:27.7333333+00:00
Handian Sudianto 4,511 Reputation points
answered 2024-07-19T07:38:43.04+00:00
Andreas Baumgarten 104K Reputation points MVP
1 answer

Azue runbook - Exchange PowerShell

We are trying to automate mail flow reporting via Azure runbooks using an app registration (service principal) to authenticate. The runbook will query Exhchange Online powershell modules for mailflow data. The only Entra permissions that seem to allow…

Microsoft Exchange Online
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,447 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,196 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-12T14:18:19.4366667+00:00
Daniel Birrell 41 Reputation points
commented 2024-07-19T05:32:57.25+00:00
Noah Ma-MSFT 2,345 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Check Internet Connectivity using Powershell

Hello, I want to make a powershell script to test is the server have internet connectivity or not by doing ICMP to 8.8.8.8 for example and the script will return 1 if get reply and 0 if not get the reply. Anyone know here how to make that script?

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,463 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-19T00:53:03.6533333+00:00
Handian Sudianto 4,511 Reputation points
accepted 2024-07-19T03:03:09.7233333+00:00
Handian Sudianto 4,511 Reputation points
1 answer

ports remote request powershell

Hello. I have executed the get-service -computername PC01 command Wireshark showed me that port 135 is used in the first…

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,463 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-18T13:43:04.61+00:00
Андрей Михалевский 2,891 Reputation points
commented 2024-07-18T15:37:52.6366667+00:00
Rich Matheisen 45,906 Reputation points
1 answer One of the answers was accepted by the question author.

Set -RemotePowerShellEnabled on Multiple Accounts with Duplicate Display Names

Hey team, I've been racking my brain for the last hour and I think I just need a fresh perspective. In short - The following command would disable remote PowerShell for all users within the tenant: Get-User | Set-User -RemotePowerShellEnabled…

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.
4,368 questions
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,331 questions
asked 2024-07-17T17:14:40.9666667+00:00
Championface 20 Reputation points
commented 2024-07-18T11:39:07.21+00:00
Championface 20 Reputation points
1 answer

Microsoft Search insights and configuration - Download Report using API or Power Automate

SharePoint site collection administrators will be able to get insights regarding the total number of search queries performed, number of results by type over time, top searched queries etc. from Site Settings. Site Settings->Search Insights and…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,447 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,301 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-06-29T05:17:20.0066667+00:00
Varghese, Ajith (Cognizant) 0 Reputation points
edited the question 2024-07-18T09:53:26.3633333+00:00
Rakesh Gurram 5,485 Reputation points Microsoft Vendor
2 answers

How can I send a message to microsoft teams channel with powershell, without using a webook?

Webhooks do not seem to work with our teams instance no matter what permissions we try: Therefore, I am wanting to do this via powershell. I have created an app registration in the azure tenant, and given it the following permissions: This is my current…

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,629 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,447 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,065 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2023-07-03T23:00:20.8733333+00:00
Aaron Dalla-Longa 0 Reputation points
commented 2024-07-17T21:34:10.45+00:00
Yousef Imran 0 Reputation points
1 answer One of the answers was accepted by the question author.

How to Get-ItemProperty for registry items on remote servers

I am attempting to pull SQL server instance details for a multitude of SQL servers, but am not able to get it working. Seems to come down to how parameter 'Path' gets it's value from my $path variable.: #Set server list manually with array $serverList =…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-16T15:29:27.31+00:00
Lindberg, Andrew 20 Reputation points
commented 2024-07-17T15:08:40.7233333+00:00
Rich Matheisen 45,906 Reputation points
0 answers

Invalid input error when configuring exclusions for MARS agent backup schedules via PowerShell

MARS agent version: 2.0.9266.0 Operating Systems: Server 2022, 2019, Windows 11 Azure Powershell versions 10.4.1.37722 x64 as well as 12.1.0.38758 x64 We need to deploy the MARS agent and configure backup schedules via powershell to many devices. The…

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,192 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-17T03:32:28.3+00:00
Joel Stockley 5 Reputation points
commented 2024-07-17T14:57:55.55+00:00
SadiqhAhmed-MSFT 41,721 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

Get-Service blocked by firewall

Hi, I have 2 virtual machines named AAA and BBB. I tried running the following command from the BBB machine and it didn't work: Get-Service -ComputerName AAA | Where-Object {($_.starttype -like "*auto*") -and ($_.Status -eq…

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,614 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-16T09:35:04.2+00:00
SC 166 Reputation points
accepted 2024-07-17T14:38:59.8366667+00:00
SC 166 Reputation points
1 answer One of the answers was accepted by the question author.

Find all expired sharing links in SharePoint using PowerShell

How can I use PowerShell to find all expired anonymously shared links in SharePoint? I found this script (shared (1).txt) in this thread and modified it to (File.txt). However, it only fetches links with the access type of "can view and can…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,301 questions
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,810 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-16T12:31:42.8066667+00:00
Roy_Jaze 40 Reputation points
accepted 2024-07-17T02:46:39.78+00:00
Roy_Jaze 40 Reputation points
2 answers One of the answers was accepted by the question author.

I want to send en email and have that converted into news post in Sharepoint

Please help with this relatively simple ask (I think) which there are few recent answers on the MS community. I would like to Send an email from outlook to a certain email address with a subject and body I want that email to go to Sharepoint and be…

Outlook
Outlook
A family of Microsoft email and calendar products.
3,427 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,301 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,331 questions
asked 2024-07-11T00:29:59.7166667+00:00
kman202020 20 Reputation points
answered 2024-07-16T17:42:07.0033333+00:00
kman202020 20 Reputation points