2,272 questions with PowerShell-related tags

Sort by: Updated
2 answers

How can I combine 2 get-ADComputer queries in 1

Can someone please help me? I am trying to find computers that match this criteria (see from screenshot Screenshot 2024-06-26 085801.png) Right now I have 2 queries, Find all enabled computers : $allEnabledComputers=Get-ADComputer -Filter…

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,445 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-27T02:44:50.9366667+00:00
BMBM83 0 Reputation points
answered 2024-06-27T18:59:51.69+00:00
Rich Matheisen 45,591 Reputation points
1 answer One of the answers was accepted by the question author.

PowerShell MFA opens browser instead of mini-browser

Recently I reset my Windows 11 PC and also upgraded to PowerShell 7.4.2. Something is now causing any MFA sessions in PowerShell to launch a new tab in my default browser rather than opening a mini-browser to handle the modern authentication. It should…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-04-17T13:58:24.7133333+00:00
David Dawson 100 86 Reputation points
edited a comment 2024-06-27T17:42:26.05+00:00
David Dawson 100 86 Reputation points
1 answer

Use PowerShell cmdlets in C#

Is it possible to use the cmdlets of a specific PowerShell version in C#? PowerShell has its limits regarding OO programming, so I'd like to use C# more, and make use of the power of the PowerShell cmdlets from within C#. My requirement is to have access…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,571 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.
10,569 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-27T13:32:37.0866667+00:00
Hinterleitner Andreas 0 Reputation points
answered 2024-06-27T14:57:44.9333333+00:00
Jiale Xue - MSFT 42,146 Reputation points Microsoft Vendor
0 answers

Why do Get-AzSentinelAlertRule/Incident Powershell CLI queries not always provide specified output detail?

When running the following List-all-alert-rules query, Get-AzSentinelAlertRule -ResourceGroupName "myResourceGroupName" -workspaceName "myWorkspaceName" all specified field key:value pairs are returned for every rule, including the…

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,173 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-24T07:32:41.6366667+00:00
Colin Sanders 0 Reputation points
commented 2024-06-27T07:53:53.7366667+00:00
Colin Sanders 0 Reputation points
2 answers One of the answers was accepted by the question author.

Listing file information filtered on values in a file

Hi, I would like to list sizes on all files in a directory, but the listed file names must match filenames picked up from a file. Basic information file size from this; Get-ChildItem -Path "\servername\DATA\files" -File | Select-Object…

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,445 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-26T09:18:57.3433333+00:00
Fredrik M 206 Reputation points
accepted 2024-06-27T07:02:42.51+00:00
Fredrik M 206 Reputation points
1 answer

Onedrive - batch download files

Someone shared a OneDrive folder with me containing over 20,000 files. Due to the download size limit, I'm unable to select and download them all at once. I tried using browser extensions, but they aren't reading the files. Reading online, I found…

OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
937 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-25T01:42:49.1433333+00:00
User4 0 Reputation points
answered 2024-06-27T05:31:41.8266667+00:00
Neuvi Jiang 545 Reputation points Microsoft Vendor
3 answers

Bulk Update of Users in Entra ID

I need a PowerShell script that updates all of my users' Employee IDs. NONE of the scripts I have found have worked due to one reason or another. I need a script that is recent using cmdlets and parameters that actually work.

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,345 questions
asked 2024-06-24T15:33:39.61+00:00
Nicholas Truden 40 Reputation points
edited an answer 2024-06-27T05:20:19.3966667+00:00
Neuvi Jiang 545 Reputation points Microsoft Vendor
0 answers

Get-AdminPowerApp fails when authenticating using service principal

I registered an application and added it as a Service Principal according to this guide: https://learn.microsoft.com/en-us/power-platform/admin/powershell-create-service-principal. I then logged in as this service principal. I am trying to get a list of…

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,445 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-26T19:53:35.7433333+00:00
FabulousFab 21 Reputation points
2 answers

EWS service bind failure with powershell

I'm facing an issue while trying to use a powershell script to connecto to Exchange 2016 EWS service to extract calendar info from users' mailboxes. The error I get is Exception calling "Bind" with "2" argument(s): "The request…

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,465 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-25T06:59:24.2+00:00
Stefano Colombo 221 Reputation points
commented 2024-06-26T15:25:27.5533333+00:00
Vasil Michev 99,126 Reputation points MVP
1 answer

I'm hoping to find a sharepoint powershell script to enable only major versions at the site level. Is this possible?

Too many folders do ea parent. I'm hoping to find a sharepoint powershell script to enable only major versions at the site level. Is this possible?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,149 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-19T14:35:43.98+00:00
kewally 0 Reputation points
commented 2024-06-25T06:28:11.8566667+00:00
AllenXu-MSFT 17,666 Reputation points Microsoft Vendor
1 answer

how to enable internet connection share on windows server core 2016

please, how to enable internet connection share on windows server core 2016, just with command line console or powershell.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,512 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,445 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-21T14:44:03.5666667+00:00
jiajia wan 0 Reputation points
commented 2024-06-24T10:44:22.6333333+00:00
jiajia wan 0 Reputation points
2 answers

How to launch Microsoft Edge to a specific Workspace?

How can I launch Microsoft Edge directly to a specific shared Edge Workspace, ie what is the command line switch? Preferably I would like to launch two workspaces at once; more preferably I would like to launch them on to the last desktop region that…

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,223 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2023-09-11T09:44:11.8766667+00:00
Paul Jefferies 15 Reputation points
commented 2024-06-24T04:58:05.6133333+00:00
sirouk 0 Reputation points
1 answer

How can I change the ProxyAddresses property associated with a guest user using PowerShell

Guest users in M365 do not have 365 mail boxes. Emails to guest users are sent to the external email address provided when the guest user is created. On creation of a guest user the user object has the following properties: Mail = "<user's…

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,214 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-21T19:04:18.7466667+00:00
IT Admin 0 Reputation points
edited an answer 2024-06-22T16:05:31.7233333+00:00
Vasil Michev 99,126 Reputation points MVP
3 answers

Execute ps1 file on startup with all users

Hello Everyone, I am trying to execute the ".ps1" file which is making changes in the registry "HKCU" path. I want that every user which is present on the local machine, should execute this file on startup. I have tried a few things,…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,058 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-19T23:46:49.4366667+00:00
Mayur Bhatti 20 Reputation points
commented 2024-06-21T20:58:42.9433333+00:00
Marcin Policht 16,725 Reputation points MVP
1 answer

Office 365 Apps frequently get disconnected from work account

The problem occurs on all Office 365 Apps when users log into their session from powered off pc, as everyone do at the beginning of a work day. It occurs on apps which are connected to a work account via the feature located on Windows in…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,058 questions
Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,436 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-20T14:54:02.45+00:00
Stéphane M 0 Reputation points
edited the question 2024-06-21T06:17:01.5433333+00:00
Stéphane M 0 Reputation points
3 answers One of the answers was accepted by the question author.

What PowerShell script can list all Azure AD users along with their last login date, in a CSV?

Hi there What PowerShell script can list all Azure AD users along with their last login date, in a CSV? Thanks.

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,345 questions
asked 2023-04-13T20:51:24.1033333+00:00
frob 4,216 Reputation points
edited a comment 2024-06-20T21:27:29.0633333+00:00
Ross Young 0 Reputation points
1 answer

How to create a webapp slot without copying settings using PowerShell?

I want to create a Slot for an Azure WebApp using PowerShell, without copying any settings from the main production slot. The command I'm using is: New-AzWebAppSlot -ResourceGroupName $ResourceGroup -Name $ApplicationName -Slot $SlotName -ErrorAction…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,267 questions
asked 2024-05-23T09:02:37.6566667+00:00
Vijay Kabbur 0 Reputation points
edited the question 2024-06-20T15:07:12.8133333+00:00
Vijay Kabbur 0 Reputation points
3 answers

How to get a list of AD users that are set to change password at next logon

Hello, I am trying to export a list of all users in AD including a column for "ChangePasswordAtLogon" attribute. I have tried a lot of different variations but none of them have worked. This is one of the formats that didn't work. …

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,147 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,445 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-19T22:39:41.01+00:00
Vahid 0 Reputation points
answered 2024-06-20T15:03:03.7433333+00:00
Rich Matheisen 45,591 Reputation points
0 answers

How do I use New-MgRoleManagementDirectoryRoleEligibilitySchedule?

I am trying to create a script that applies a role and a scope to a user. The below code as what I have tried, but the result I get is a 404 error. What am I missing? "message":"No HTTP resource was found that matches the request URI…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,246 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
asked 2024-06-20T12:50:51.9033333+00:00
Sune Justesen 40 Reputation points
0 answers

Invite bulk guest user using powershell

I want to invite bulk guest user using powershell and add guest user to group directly using script I dont want them to send notification when they were being added to Entra but when they added to group I want to send them notification for me for eg:…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
Microsoft Entra
asked 2024-06-20T08:16:45.11+00:00
サンデャ 管理者 40 Reputation points