5,521 questions with Windows Server PowerShell tags

Sort by: Updated
0 answers

Unique identity

Unique identity Hi there. I got someone who was trying to log into my Facebook the other day. Would you be able to see who the ID belongs to ?

Microsoft Identity Manager
Microsoft Identity Manager
A family of Microsoft products that manage a user's digital identity using identity synchronization, certificate management, and user provisioning.
695 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,837 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,521 questions
asked 2024-10-04T01:12:43.8733333+00:00
AN Nic 0 Reputation points
0 answers

PowerShell Schedule Task

Hello, I have powershell script to insert some data into SQL server, when i double click on the .ps1 file i can see the data in SQL server. Then i want to make this script running every hours and i schedule this using windows task scheduler. But…

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
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,521 questions
asked 2024-10-03T02:44:58.6966667+00:00
Handian Sudianto 4,956 Reputation points
commented 2024-10-03T15:14:47.3666667+00:00
Rich Matheisen 46,711 Reputation points
3 answers One of the answers was accepted by the question author.

how to run .bat file in powershell ???

i am unable run infacmd.bat file in powershell tried using start process tried cmd tried powershell.exe can anyone ping me ,please Thanks, Mahesh

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,521 questions
asked 2022-09-24T11:06:30.8+00:00
Kottam Mahesh 21 Reputation points
accepted 2024-10-03T14:46:59.5266667+00:00
Kottam Mahesh 21 Reputation points
1 answer

Task Scheduler is unable to fetch credentials from Windows Credential Manager. It’s returning null for the username and password

We have one Task Scheduler job using Credential Manager to store service account credentials(Generic). After a password change, we started facing this issue. We have a PowerShell script configured as a Task Scheduler job that uses Credential Manager to…

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
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,521 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-05-23T12:09:22.66+00:00
Ava Tomlinson 111 Reputation points
edited a comment 2024-10-03T05:53:45.8133333+00:00
RICHTER Salvador 0 Reputation points
1 answer

Exporting a list of users with no profile picture in a specific OU via Azure AD Powershell

So I haven't used PowerShell in a while wondering the best way to Export specific OU's users that do not have profile pictures tied to their account via Powershell. …

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,521 questions
asked 2022-09-30T08:51:16.413+00:00
Blank_Ini 1 Reputation point
commented 2024-10-02T20:38:00.43+00:00
Korazu DyShin 0 Reputation points
2 answers

unable to connect Azure

Hi All I use the below syntax to connect to Azure Powershell, but today i am unable to connect to azure powershell. it prompts me to enter tenant and subscription number. I have 1500 subscriptions, how can i know the subscription number for my…

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,521 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,675 questions
asked 2024-09-19T15:36:47.1233333+00:00
Glenn Maxwell 11,316 Reputation points
commented 2024-10-01T22:03:31.4666667+00:00
Raja Pothuraju 6,170 Reputation points Microsoft Vendor
1 answer

Windows powershell

I want to install wsl, I triend from powershell just by entering this command(wsl--install) but It appears that It does not recognize It and I restarted mu PC to validate a problem but It does not provide a Solution, what can I do in this Situation? How…

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,521 questions
asked 2024-10-01T01:20:54.9633333+00:00
John 2000 0 Reputation points
answered 2024-10-01T13:01:36.6533333+00:00
MotoX80 33,481 Reputation points
2 answers One of the answers was accepted by the question author.

Query a Specific service Value through Powershell

I Need help with the below PowerShell command to query the value of Windows Update "IsDefaultAUService" PS C:\Users\Administrator> $(New-Object -ComObject "Microsoft.Update.ServiceManager").Services Output of this command …

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,521 questions
asked 2022-08-26T04:00:48.447+00:00
Hari Bylapudi 21 Reputation points
commented 2024-09-30T21:59:28.28+00:00
Christian Eriksson private 0 Reputation points
2 answers One of the answers was accepted by the question author.

After renaming a SharePoint Online document library folder, from /OldName to /NewName, how to redirect URLs for everything inside the folder, so older URLs forward to new URLs?

Hi there After renaming a SharePoint Online document library folder, from /OldName to /NewName, how to redirect URLs for everything inside the folder, so older URLs forward to new URLs? Happy to use PowerShell or any other way. E.g. …

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,678 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,521 questions
asked 2022-08-29T18:45:50.967+00:00
frob 4,221 Reputation points
commented 2024-09-30T09:37:03.88+00:00
DavidG4P 21 Reputation points
3 answers One of the answers was accepted by the question author.

query on powershell script

Hi All I am trying to use the following lines in a PowerShell script. Lets say extensionAttribute1 represents the job ID of users. When I use the query below, I am getting users with different job IDs as well. What I need is to pull users with job ID 123…

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,744 questions
Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,504 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,515 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,521 questions
asked 2024-09-29T11:20:16.4433333+00:00
Rising Flight 4,516 Reputation points
accepted 2024-09-29T19:47:14.0566667+00:00
Rising Flight 4,516 Reputation points
2 answers One of the answers was accepted by the question author.

Powershell - making folder using $env:username

Hello, I´m new with Powershell and I have script, where I need to make folder using $env:username plus something else - for ex. username is David_N and I need to have folder David_N_Files I can only make folder called $env:username Is it possible…

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,521 questions
asked 2022-02-17T13:54:30.333+00:00
David Novotný 21 Reputation points
edited an answer 2024-09-29T18:53:04.2766667+00:00
Ben Kuong 0 Reputation points
2 answers

Warning PowerShell ID 300

Hi, More than a year after reporting the problem, I continue to receive the same PowerShell warning despite everything working normally and all versions being up to date. Maybe with this new information we can better understand the problem. I know it…

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,589 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,521 questions
asked 2024-09-14T17:41:59.9366667+00:00
Piero 75 Reputation points
commented 2024-09-28T20:47:18.1333333+00:00
MotoX80 33,481 Reputation points
1 answer One of the answers was accepted by the question author.

how to get rid of the response from Exchange when password is invalid and catch error message instead?

I have the following command: $null = Connect-ExchangeOnline -Credential $cred -PSSessionOption $proxyOptions -ShowBanner:$false -ErrorAction Stop SilentlyContinue -WarningAction SilentlyContinue -InformationAction SilentlyContinue -ErrorVariable…

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,514 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,521 questions
asked 2024-09-25T15:13:34.14+00:00
Konrad Wojciechowski (Nokia) 40 Reputation points
commented 2024-09-27T11:39:26.0933333+00:00
Konrad Wojciechowski (Nokia) 40 Reputation points
0 answers

Powershell script to enable Microsoft.SQL service endpoint and add to Azure SQL

We have certain VM's that need to be able to access Azure SQL. Since allow public access is turned off, I need to add the Virtual Network/Subnet to SQL Instance. Then also, I need to enable Microsoft.SQL for the service endpoint on any of the subnets…

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,254 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,521 questions
asked 2024-08-05T14:08:11.1366667+00:00
Jeff Fazio 36 Reputation points
commented 2024-09-27T06:52:49.1666667+00:00
Rahul Podila 90 Reputation points Microsoft Vendor
1 answer

How to update Scheduled tasks (CimInstanceProperties)?

Hi, I have several servers/workstation collecting user defined Data Collector sets. But unfortunately Microsoft has carried a bug with multiple windows versions, as they state on here: User Defined DCS Doesnt Run As Scheduled The workaround is 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.
5,521 questions
asked 2021-08-27T18:27:53.227+00:00
Petri X 41 Reputation points
commented 2024-09-26T19:39:59.7733333+00:00
Paul Atkins 0 Reputation points
0 answers

Prebuilt PowerShell scripts

Hello Please i need your help on this issue. Please do we have any prebuilt PowerShell scripts from Microsoft that can identify teams groups that contain files? Here’s the one we had tried that isn’t working:  # Connect to Microsoft…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,998 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,521 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-09-26T15:17:18.4266667+00:00
IniobongNkanga-8038 631 Reputation points
4 answers

Update Micorosoft Store and Store Apps with command line?

Hi To update Microsoft Store and Store Apps, I navigate to the Store and select "Get Updates", like above screenshot. Question: Is there any possibility to achieve the same with Command Line /Power Shell or DISM?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,568 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,589 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,521 questions
asked 2022-09-05T09:31:41.387+00:00
~OSD~ 2,176 Reputation points
commented 2024-09-25T16:04:56.9166667+00:00
DGarkie 0 Reputation points
2 answers One of the answers was accepted by the question author.

How to find and remove security group from local admin group with Powershell

How would I write this in PS where I'm looking for or checking for "Company\Domain Admins" security group from local Administrators group? Get-LocalGroupMember -Group "Administrators" (Gives me a list of groups that are in the Local…

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,521 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-09-23T20:43:06.51+00:00
Cody 321 Reputation points
answered 2024-09-24T15:45:53.9366667+00:00
Cody 321 Reputation points
1 answer One of the answers was accepted by the question author.

How to capture Error like Get-AzRoleAssignment : Operation returned an invalid status code 'NotFound' and do some activity in if-else block based on this error

How to capture Error like Get-AzRoleAssignment : Operation returned an invalid status code 'NotFound' and do some activity in if-else block based on this error

Azure Role-based access control
Azure Role-based access control
An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
807 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,521 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,675 questions
asked 2024-09-20T11:32:46.0666667+00:00
Rituparna Hazra (Digital) 20 Reputation points
edited the question 2024-09-23T03:55:21.5733333+00:00
Givary-MSFT 32,581 Reputation points Microsoft Employee
2 answers One of the answers was accepted by the question author.

How to use splatting

I am looking for some help with splatting , I have the below lines to grab a registry key and want it to be passed into a hash table to make it more simpler to view to reduce the length if ($Version -ge 16) { # Grab the value of SAID…

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,521 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,502 questions
asked 2024-09-20T07:27:13.79+00:00
Sara 441 Reputation points
edited an answer 2024-09-20T19:25:14.8733333+00:00
Rich Matheisen 46,711 Reputation points