5,627 questions with Windows Server PowerShell tags

Sort by: Updated
6 answers

Issues with Web Front End app for background PS scripts with PS remoting inside

Hi, I have issues with Web Front End app (running on IIS) for background PS scripts with PS remoting inside: $session = New-PSSession -ComputerName dcName -ConfigurationName DomainAdmins Invoke-Command -Session $session -ScriptBlock {...} …

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,627 questions
asked 2024-11-09T07:30:47.79+00:00
Bojan Zivkovic 526 Reputation points
answered 2025-02-15T17:23:22.9033333+00:00
Bojan Zivkovic 526 Reputation points
1 answer

WARNING: The version '1.4.8.1' of module 'PackageManagement' is currently in use. Retry the operation after closing the applications.

I can't seem to update modules. I do not know why I keep getting this error. WARNING: The version '1.4.8.1' of module 'PackageManagement' is currently in use. Retry the operation after closing the applications. I'm trying to update Exchange…

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,627 questions
asked 2025-02-14T15:34:54.99+00:00
ComputerHabit 1,011 Reputation points
answered 2025-02-14T20:59:52.3133333+00:00
Rich Matheisen 47,596 Reputation points
2 answers

How to deploy printer in a GPO via powershell

I'd like to add printers into a GPO via powershell because eventually I need to add 50-100 printers. This is the process. Then, I need to add printers inside "Control Panel Settings" So, I created the first part of the…

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,799 questions
Windows Server Printing
Windows Server Printing
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Printing: Printer centralized deployment and management, scan and fax resources management, and document services
698 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,627 questions
asked 2022-05-11T14:41:15.9+00:00
commented 2025-02-14T17:51:48.0733333+00:00
Robert Cocker 0 Reputation points
1 answer

Windows 2022 server requesting activation even though it is already activated

Windows 2022 server requesting activation even though it is already activated once i sign into the server the activation disappears for the users

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,907 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,703 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,627 questions
asked 2025-02-13T13:18:03.28+00:00
Gallery Admin 0 Reputation points
answered 2025-02-14T08:17:43.07+00:00
Daisy Zhou 29,471 Reputation points Microsoft Vendor
3 answers One of the answers was accepted by the question author.

Display SSL certificate expiration dates via PowerShell

Hello! I'm trying to figure out how to display when SSL certificates expire. Currently, I have the following code (which was provided to me by a colleague) and I want to know how to display the certificate's expiration date. If possible I would also like…

Internet Information Services
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,703 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,746 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,627 questions
asked 2022-06-16T20:49:16.917+00:00
Jess13777 41 Reputation points
answered 2025-02-12T20:29:32.6533333+00:00
Suryawanshi, Santosh 0 Reputation points
4 answers One of the answers was accepted by the question author.

WinGet.exe upgrade --all -Exclude

How to exclude the list of apps [third-party application, MS applications, and MS KBnumbers] while running winget upgrade -all commands. Is there any parameter to exclude any application? It will be appriciated

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,064 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,627 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
5,554 questions
asked 2023-04-07T17:32:54.1133333+00:00
Vij 311 Reputation points
commented 2025-02-12T11:32:31.4466667+00:00
Hilton 0 Reputation points
1 answer One of the answers was accepted by the question author.

Can I use both Get-AzRmStorageShare and Get-AzStorageShare modules in an Azure Automation Runbook? Body:

Hi, I currently have two different PowerShell scripts running locally on my machine, where one uses the Get-AzRmStorageShare module and the other uses the Get-AzStorageShare module to retrieve usage and quota information for an Azure File Share. Both…

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,307 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,627 questions
asked 2025-02-12T08:51:09.0733333+00:00
Suthii09 40 Reputation points
accepted 2025-02-12T09:34:33.8066667+00:00
Suthii09 40 Reputation points
2 answers

How to generate a report for the list of all enterprise application that is using a single sign on (SSO)

Please asking for your help on how to generate a report to view the list of all Enterprise applications using a single sign on authentication via in a powershell. Thank you in advance

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
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,627 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,811 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.
23,255 questions
asked 2025-01-30T05:02:33.4+00:00
JYLVEN TARRAJA 80 Reputation points
commented 2025-02-11T20:55:23.5333333+00:00
Raja Pothuraju 12,980 Reputation points Microsoft Vendor
0 answers

"The SSL connection could not be established, see inner exception." Issue Installing Microsoft.Graph Module in PowerShell in PowerShell

Hi everyone, I'm experiencing an issue when trying to install the Microsoft.Graph module using PowerShell 7. When I run the following command: Install-Module Microsoft.Graph -Scope CurrentUser -Repository PSGallery -Force -verbose I receive the…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
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,627 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,811 questions
asked 2025-02-10T17:02:00.11+00:00
Bragaglia, Andrea (IT) 5 Reputation points
commented 2025-02-11T19:04:11.7166667+00:00
Kapgnep Flora 5 Reputation points
0 answers

I'm stucked with the error 401 unauthorized when using *PnP* Commands like Get-PnPList

Connect-PnPOnline using OAuth works fine and Get-PnPContext works but all other PnP commands get the error It worked fine using Credentials until about the first days in 2025

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,627 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,811 questions
asked 2025-02-11T13:09:23.6733333+00:00
Olav Andersen 0 Reputation points
1 answer One of the answers was accepted by the question author.

Powershell script for Microsoft Entra to reset the password in AD account user after 14 days

Please asking for your help on how to create a script in a powershell to reset the password of the AD users (Microsoft Entra) after in the 14days. Thank you in advance

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,627 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,811 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,255 questions
asked 2025-01-30T05:14:57.5566667+00:00
JYLVEN TARRAJA 80 Reputation points
commented 2025-02-11T12:36:07.48+00:00
Raja Pothuraju 12,980 Reputation points Microsoft Vendor
1 answer

Windows Subsystem for Linux

Hi All I have installed Windows Subsystem for Linux on Windows Server 2019. The installed version is Ubuntu 22.04.1.7.0 When I click on WSL, it opens successfully. However, when other users click on WSL, nothing happens. They are local administrators on…

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,907 questions
Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,575 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,703 questions
Windows Server Management
Windows Server Management
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Management: The act or process of organizing, handling, directing or controlling something.
449 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,627 questions
asked 2025-02-10T22:13:34.6866667+00:00
Glenn Maxwell 12,336 Reputation points
answered 2025-02-11T00:57:10.6766667+00:00
S.Sengupta 22,181 Reputation points MVP
1 answer

PowerShell Script for Accessing Sent Emails in Outlook and Exchange

I am developing a PowerShell script to retrieve sent email IDs from my Outlook sent mailbox for both the "To" and "CC" sections, from the beginning of the email account to the current date. I managed to create a script that works for…

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,746 questions
Microsoft Exchange
Microsoft Exchange
Microsoft messaging and collaboration software.
683 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,627 questions
asked 2025-02-02T05:13:01.9+00:00
Avinash 20 Reputation points
commented 2025-02-10T05:31:15.2466667+00:00
Avinash 20 Reputation points
2 answers

How to fix: The user profile Service service failed the sign-in. user profile cannot be loaded

Dear Team I have an issue with users through the business and branches. The domain account fail to load with error: The user profile Service service failed the sign-in. user profile cannot be loaded. It's affecting part of the users, it's not a daily…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,064 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,703 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,746 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,627 questions
asked 2023-11-14T07:18:36.81+00:00
Census Mathebula 0 Reputation points
edited an answer 2025-02-07T13:01:50.7933333+00:00
Kapil Arya 8,211 Reputation points MVP
1 answer

Validating inactive user list and excluding removing inactive users from AD groups

test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test…

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,627 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,811 questions
asked 2025-02-06T04:00:54.7333333+00:00
Varma 1,385 Reputation points
answered 2025-02-07T12:11:03.59+00:00
Marcin Policht 35,595 Reputation points MVP
4 answers

A positional parameter cannot be found that accepts argument

Hi All I used the following syntax to grant "TempPolicy1" globally. However, I am encountering an error while trying to remove this policy "TempPolicy1" globally Please guide me. Grant-CsApplicationAccessPolicy -PolicyName…

Microsoft Exchange Online
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,878 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,746 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,559 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,627 questions
asked 2025-02-02T21:02:21.7733333+00:00
Roger Roger 6,761 Reputation points
commented 2025-02-07T09:53:49.4233333+00:00
Xintao Qiao-MSFT 6,350 Reputation points Microsoft Vendor
1 answer

powershell script is not working as expect

I wanted to cancel all running or pending runs in a Logic App Standard workflow(from a custome days) But I think the below script is not working as expected. Variables $ResourceGroupName = "ResourceGroupName " $LogicAppName =…

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,627 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,811 questions
asked 2025-02-07T07:19:29.9166667+00:00
answered 2025-02-07T07:21:19.0266667+00:00
1 answer

How to generate a report via powershell,list of all Enterprise applications using a single sign on authentication

Hi, Good day Please asking on your expertise in generating a list of enterprise applications in Microsoft Entra to identify who are using the Single Sign On authentication. Thank you in advance.

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,740 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,627 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,811 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,255 questions
asked 2025-01-31T00:15:56.0166667+00:00
JYLVEN TARRAJA 80 Reputation points
commented 2025-02-07T03:52:40.06+00:00
Sandeep G-MSFT 20,721 Reputation points Microsoft Employee
3 answers

How to downgrade Java version default installed into Azure Portal from Java 17 to Java 11

Java Maven compatibility issues. Java version 17 and Maven version 3.6 is the default versions in my Azure CLI. Steps to replicate Login to azure portal Click on the Azure CLI icon Azure CLI poweshell terminal opens up Type mvn -X Following…

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,627 questions
asked 2022-05-16T08:12:53.63+00:00
CHEKOOR, Jaya 1 Reputation point
edited the question 2025-02-06T16:20:13.1533333+00:00
TP 103.2K Reputation points
3 answers One of the answers was accepted by the question author.

Invoke-WebRequest to a web server with self-signed SSL certificate

I have an IIS website hosted in a Windows 2019 server. I enbled HTTPS/SSL using a self-signed certificate. Now in a client machine, I wanto use Invoke-WebRequest to connect to the server using HTTPS and it fails wjith no doubt. Invoke-WebRequest: The…

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,627 questions
asked 2023-09-04T11:08:45.92+00:00
Neo 421 Reputation points
edited an answer 2025-02-06T15:03:47.18+00:00
Koopee 0 Reputation points