Microsoft Q&A

Windows Server PowerShell

4,627 questions

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.

Browse all Windows tags

4,627 questions with Windows Server PowerShell tags

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

Powershell script to delete particular type of file extension without removing the Folders

Hello All, I have requirement to remove the particular type of files extension from the computer without removing the folders. The files are in various path of the system and i have planned to map the C:/ and also log need to be stored for what are all…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
116 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.
4,627 questions
Microsoft Configuration Manager
asked 2023-02-05T14:31:57+00:00
Loganathan R 46 Reputation points
accepted 2023-02-08T00:54:48.6533333+00:00
Loganathan R 46 Reputation points
0 answers

How to fix Add-NetNatStaticMapping error "The process cannot access the file because it is being used by another process" ?

Hello, With a windows server 2019 and a VM in Hyper-V, I have created a virtual switch and NAT : When I try to add a mapping : Add-NetNatStaticMapping -NatName "NAT" -Protocol TCP -ExternalIPAddress "0.0.0.0/24" -ExternalPort…

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.
4,627 questions
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
1,837 questions
asked 2023-02-07T18:57:02.2933333+00:00
Georges B 0 Reputation points
4 answers

AVD information

Hi All I am using azure virtual desktop. i have a Host Pool and i want to export all AVDs information to csv file. When i go to Azure Virtual Desktop-->Host Pools-->Pool1. i can export to csv file but i want to get what SKUs they are. i don't see…

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.
4,627 questions
Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
928 questions
asked 2023-02-05T19:25:06.3966667+00:00
Roger Roger 4,541 Reputation points
answered 2023-02-07T17:07:09.24+00:00
Roger Roger 4,541 Reputation points
2 answers

How to get NIC Firmware versions

Ive been trying to get the NIC firmware versions of all of our physical servers but i cant seems to find a powershell code or script that can do this. I have tried wmiobject, ciminstance and get-netadapter but no firmware versions. Any suggestions? Any…

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.
4,627 questions
asked 2023-02-06T22:01:34.9166667+00:00
Arturo Abbido 1 Reputation point
answered 2023-02-07T16:54:45.0433333+00:00
Limitless Technology 10,021 Reputation points
3 answers One of the answers was accepted by the question author.

Script Returning Empty Values for memberOf

I've got a script that is supposed to pull the memberOf attribute for a list of device names that it pulls from a file, and the script successfully returns the name property. But the memberOf attribute is empty for all devices using the method below.…

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.
4,627 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
3,662 questions
asked 2023-02-06T21:41:57.8266667+00:00
Maranya, Damon 171 Reputation points
commented 2023-02-07T16:42:05.15+00:00
Maranya, Damon 171 Reputation points
1 answer

Quest Active Directory command for moving Disabled Objects

Hi, I want a Quest Active Directory command for moving Disabled computers from one OU to Another. $SourceOU = "OU=IG Workstations W10,DC=igi,DC=ig,DC=local" $TargetOU = "OU=Disabled Computers,OU=Disabled…

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
3,662 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
8,257 questions
Azure Active Directory Domain Services
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.
4,627 questions
asked 2023-02-07T13:47:14.1566667+00:00
Tedjith David 0 Reputation points
answered 2023-02-07T15:43:28.37+00:00
Rich Matheisen 35,266 Reputation points
1 answer

How do I read an xlsx in Azure Data Lake from Powershell

Hi, What would be the best way to read in an xlsx to Powershell from the Azure data lake. I have tried the ImportExcel module however it does not like the https path? Any help appreciated

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.
4,627 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
116 questions
Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
895 questions
asked 2023-02-07T12:02:34.6133333+00:00
Christopher Jack 0 Reputation points
answered 2023-02-07T15:20:55.1166667+00:00
Monalla-MSFT 6,401 Reputation points Microsoft Employee
3 answers

Adding LPR port (non TCP/IP) via powershell

Hi there I am having an issue with adding an LPR port to my machine via powershell. I need to create the following port correctly pictured below. This results in the correct port looking like this. Running the following script Add-PrinterPort -Name…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
116 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
8,257 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.
4,627 questions
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
6,034 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
501 questions
asked 2023-01-31T22:34:07.97+00:00
Chris Petrini 0 Reputation points
commented 2023-02-06T17:21:36.1333333+00:00
Chris Petrini 0 Reputation points
2 answers

How to fix canonical issues with WordPress on App Services

I need to redirect www.example.com to example.com. I have a custom domain with SSL, https enforced. Http requests are being redirected to https and working as expected. Where, or how, do I configure a redirect to get the www.example to redirect to…

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.
4,627 questions
Azure App Services
Azure App Services
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,336 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,604 questions
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
566 questions
asked 2023-01-28T13:29:04.7433333+00:00
Joe O 0 Reputation points
edited the question 2023-02-06T12:25:28.5566667+00:00
SnehaAgrawal-MSFT 11,256 Reputation points Microsoft Employee
8 answers

Need help to customize the PNP script for Sharepoint Access Report

I Need help to customize the PNP script for Sharepoint Access Report on each user specific access. Like user1 have 3 sites access with view permission . Next user2 on another row with same . I have attach the screenshot shows…

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.
4,627 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
252 questions
SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
1,470 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,365 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
6,079 questions
asked 2023-01-10T23:56:11.433+00:00
Amarnath Jena 1 Reputation point
commented 2023-02-06T10:13:39.6866667+00:00
Yanli Jiang - MSFT 6,126 Reputation points Microsoft Employee
4 answers

Create excel data to LDIF format using PowerShell

My Requirement is like, we will ask requester to fill an excel sheet where they will put the values in column uiddn(A1 in excel sheet) and nIds(B1 in excel sheet). For Example: uiddn nIds uid=uid12345,cn=abc,cn=def,dc=xyx…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
116 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.
4,627 questions
asked 2023-02-02T10:15:55.3533333+00:00
Satyajit Rout 0 Reputation points
commented 2023-02-05T16:27:27.19+00:00
Rich Matheisen 35,266 Reputation points
2 answers

using Azure CLI to change pipeline status Enabled/Disabled

Hi, i tried to use Aure CLI to get a list of a pipelines from one repository on azure devops and i am trying to find out if i can change the status of a pipeline to disabled. We have to do this via some migration bug when all the pipelines would start…

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.
4,627 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,760 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
695 questions
asked 2023-01-20T13:36:01.1833333+00:00
Piotr Jaczun 1 Reputation point
edited an answer 2023-02-05T14:48:35.77+00:00
Sumarigo-MSFT 30,991 Reputation points Microsoft Employee
2 answers

How to restart, logoff and shutdown client computer using PowerShell Remotely from Window Server Active Directory?

I am logged in to the client computer using PowerShell remotely. I am trying to logoff or restart this client computer but nothing working out. Please let me how to properly turn of the client computer using remote PowerShell. #Actve Directory #Window…

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
3,662 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.
4,627 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
8,257 questions
asked 2023-02-05T05:56:19.12+00:00
TechQ 41 Reputation points
answered 2023-02-05T06:28:33.0133333+00:00
Mihkel Kiil 1 Reputation point
3 answers

Receiving Remote Powershell errors when running enablement script on large list of users in MS Teams

We are in the midst of a migration of users from Cisco Call Manager to Teams. All users exist in the MS Teams Tenant and all we are doing is Enabling a set of users each night, in the neighborhood of +/- 250 per run, with 5 commands per user. At 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.
4,627 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.
1,708 questions
asked 2021-02-08T23:57:51.167+00:00
Steven Sheeley 1 Reputation point
answered 2023-02-05T01:23:15.64+00:00
Omar Saleh 0 Reputation points Microsoft Employee
1 answer

Testing existence of DWORD in the registry.

Hello, I am trying to test the existence of a registry DWORD (iexplorer.exe) within the registry but I am getting nothing in return... # Test for removal of the key if exists {If ((Get-ItemProperty -Path…

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.
4,627 questions
asked 2023-02-04T01:04:16.8166667+00:00
Duchemin, Dominique 1,331 Reputation points
answered 2023-02-04T15:37:43.8133333+00:00
Rich Matheisen 35,266 Reputation points
2 answers

running a cmd within powershell

I am trying to run a cmd file through powershell. The file is located in a folder inside Program Files. I have tried invoke-item -path "c:\program files\myProgram\myfile.cmd" which gave me cmd file not found message. Then, I tried to…

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.
4,627 questions
asked 2021-06-07T20:54:51.92+00:00
Hippopotamus Defence 116 Reputation points
commented 2023-02-04T08:30:00.4566667+00:00
Balaji 51 Reputation points
4 answers

4 keywords - Azure CLI, Azure PowerShell, Azure Cloud Shell and Bash

Hello everyone, Someone please explain why do we have 4 options in Azure cloud for any scripting? Also explain me the differences between the four options as shown below. 1. Azure CLI, 2. Azure PowerShell, 3. Azure Cloud Shell 4. Bash Thanks

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.
4,627 questions
asked 2020-07-19T18:51:25.967+00:00
cloudguy2020 71 Reputation points
answered 2023-02-04T06:51:51.26+00:00
Baskar Nagarajan 0 Reputation points
3 answers

Az Hybrid Connection Manager Configuration - Az Powershell Function

Hi All, I am configuring a Azure PowerShell function to communicate with Windows AD using Hybrid Connection Manager. Everything seems to be connected and I was able to run the basic cmdlet "Get-Service"(Code # 1) successfully. Code # 1 # Input…

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
3,662 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
116 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.
4,627 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
2,617 questions
asked 2023-02-01T22:15:24.6933333+00:00
PS 106 Reputation points
edited an answer 2023-02-03T21:18:42.7766667+00:00
Rich Matheisen 35,266 Reputation points
1 answer

How to fix The specified network password is not correct. powershell error

I am trying to run a PowerShell script and am being returned with the following error. Is anyone able to help? I have tried to run on the server and on my laptop and still being returned the same error after I authenticate using the domain admin…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
116 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.
4,627 questions
asked 2023-02-02T17:41:17.9533333+00:00
Anonymous
answered 2023-02-03T16:57:26.4233333+00:00
Limitless Technology 10,021 Reputation points
2 answers

Registry Address appends with folder address, throws error ?!

Hi, I have the below code which adds a newKey in the Registry, then adds Property and Value to the Key. $reg = "Registry::\" $keyPath = Join-Path -Path $reg -ChildPath 'HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
116 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.
4,627 questions
asked 2023-02-02T22:30:14.5166667+00:00
touqeeranjum 0 Reputation points
answered 2023-02-03T08:49:11.1266667+00:00
touqeeranjum 0 Reputation points