Microsoft Q&A

PowerShell

694 questions

A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.

694 questions with PowerShell-related tags

Sort by: Updated
0 answers

i can not install powershell modules

when I type install module in powershell, it immediately goes to a new line.What to do?

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-28T21:06:08.69+00:00
Sabina Šajipi 0 Reputation points
1 answer

How to rename files by date with PowerShell including characters between it

Good afternoon: First of all, note that I'm very new to this, so maybe I don't express myself as I should, I hope you understand me. I am trying to bulk rename a folder of images and videos based on the date they were taken. For now, this is the…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-28T10:41:00.9566667+00:00
Luis Matas Royo 0 Reputation points
answered 2023-05-28T20:05:38.7433333+00:00
Rich Matheisen 38,821 Reputation points
2 answers

How to output to CSV file only with the offline PC hostname and with the PC owner and PC status showing as failed on 3 columns on CSV file?

Hi all, Need some advice please. I have below script that I use, it pings all the PC hostnames listed on Hostnames.txt Fyi, I only type the PC hostname on the .txt file, I didn't include the PC user owner, if I want to Output it with the PC owner, 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.
4,883 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-04-19T14:16:15.2+00:00
shaider007 41 Reputation points
answered 2023-05-28T15:36:20.3866667+00:00
Rich Matheisen 38,821 Reputation points
0 answers

Powershell Workflow Scripts for teams

I am exploring the option for Powershell workflow as I am trying a Powershell script for Microsoft teams. I would want to make use of parallel function. However, I notice that, whenever I run the script, the second script block under parallel doesnt work…

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.
2,068 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-28T15:08:41.8266667+00:00
Karthick AP 0 Reputation points
0 answers

How to output to CSV file only with the offline PC hostnames and PC owners and PC status showing as failed on 3 columns on CSV file?

I tried the code below, it shows all the list for UP and Down PCs and showing Unknown for all the PC owners. Host PC Owner PC Status PC1 Unknown UP PC2 Unknown UP PC3 Unknown Down PC4 Unknown …

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-28T05:03:16.86+00:00
shaider007 41 Reputation points
1 answer One of the answers was accepted by the question author.

How do I update an object / jason in PowerShell?

Hi, I have the following object / jason and want to add one (or more) "target" to it. How do I do that? $Body = @{ enrollmentConfigurationAssignments = @( @{ target = @{ …

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
1,288 questions
asked 2023-05-26T21:49:54.3733333+00:00
Johan Berg 60 Reputation points
accepted 2023-05-27T20:31:09.5233333+00:00
Johan Berg 60 Reputation points
0 answers

why is this showing in my vs code: Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\Users\Dell\Documents> & 'c:\Users\Dell\.vscode\extensions\ms-vscode.cppto

Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\Users\Dell\Documents> &…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-27T17:09:57.3833333+00:00
Dekshith M 0 Reputation points
commented 2023-05-27T18:52:03.39+00:00
Rich Matheisen 38,821 Reputation points
2 answers

Unable to run powershell script to enable sso to azure portal with google credentials

Hi Team, I am testing enabling sso to azure portal using google credentials I am following these documents to set it…

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,620 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,883 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-26T05:57:13.0733333+00:00
Rohit manohar 0 Reputation points
answered 2023-05-27T17:09:22.22+00:00
Rohit manohar 0 Reputation points
5 answers

Read-SqlTableData : Failed to connect to server

Good morning. Greetings. I am making a connection to a remote SQL server on the local network via the following commands: $user = "domain\sql" $pass = "password" $credential = New-Object -TypeName…

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
9,725 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-26T19:20:32.4066667+00:00
Jairo Javier Baleta Cali 26 Reputation points
commented 2023-05-27T10:13:00.9733333+00:00
Konstantinos Passadis 4,711 Reputation points
1 answer

API policy deployment using powershell fails policy error manual copy in portal succeeds

Hi All, Below is the full policy file and when i copy this manually in portal and tested, everything works great and no error. <policies> <inbound> <base /> <send-request mode="new"…

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,231 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-27T03:09:10.19+00:00
Sridhar Ratna 0 Reputation points
answered 2023-05-27T03:33:10.6233333+00:00
Sridhar Ratna 0 Reputation points
0 answers

Help Migrating to Get-MgAuditLogSignIn to grab AuditLogs and Device Details

Hi, Previously we were using Get-AzureADAuditSignInLogs I'm trying to migrate over to Get-MgAuditLogSignIn but I'm running into a problem. Below is the code for Get-AzureADAuditSignInLogs $TodaysDate = Get-Date -format 'yyyy-MM_dd' $Outputfile =…

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,620 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-26T20:41:08.2766667+00:00
Robert Stacks 0 Reputation points
commented 2023-05-27T02:23:00.6933333+00:00
Rich Matheisen 38,821 Reputation points
1 answer One of the answers was accepted by the question author.

"Could not load file or assembly 'Microsoft.Identity.Client, Version=4.44.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae'." error whilst trying to use ExchangeOnlineManagement v3

"Could not load file or assembly 'Microsoft.Identity.Client, Version=4.44.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae'." error whilst trying to use ExchangeOnlineManagement v3 Problem: So, the scenario, you have installed…

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.
3,345 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-19T10:44:41.44+00:00
Vincent Bok 20 Reputation points
edited the question 2023-05-26T19:19:25.3933333+00:00
Vincent Bok 20 Reputation points
1 answer

Can’t use ExchangeOnlineManagement V3.1.0 together with Microsoft.Graph.Authentication V1.27.0 in powershell

Can’t use ExchangeOnlineManagement V3.1.0 together with Microsoft.Graph.Authentication V1.27.0 in powershell I’m having some trouble with using the ExchangeOnlineManagement V3.1.0 together with Microsoft.Graph.Authentication V1.27.0 in powershell. Both…

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.
1,288 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-26T13:47:37.0666667+00:00
Vincent Bok 20 Reputation points
commented 2023-05-26T19:17:13.34+00:00
Vincent Bok 20 Reputation points
0 answers

How to retrieve the image name of a private product

Hi, We published an image on the marketplace in preview mode and now we want to use the azure client to create a VM with 2 NICs. We need at least two NICs because our image is a security network appliance (embeds a firewall). Additional question: is it…

Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
378 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-26T19:09:40.52+00:00
CacheGuard 0 Reputation points
1 answer

How to run a powershell script to generate exe in ubuntu with ps2exe package

Hi All, How to make powershell script to generate exe in ubuntu with ps2exe package. My script is working fine in Windows OS but the same script not working in Ubuntu. I need to run this script in Ubuntu because I have only one AWS cloud server which…

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,883 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-26T11:25:27.0833333+00:00
Bhavneet Singh 0 Reputation points
answered 2023-05-26T18:08:07.14+00:00
Rich Matheisen 38,821 Reputation points
3 answers

How to check if a predetermined list of users has mfa enabled via script or powershell command

I need to check if users on a list have mfa enabled. There are many users to consult on the Portal. And I also don't want to do the query using the get-mfareports.ps1 script that brings the status of all users, as I would have to compare line by line…

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,620 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-18T20:25:30.6833333+00:00
Selma Saglauskas Dias Gambarini 0 Reputation points
commented 2023-05-26T17:03:34.23+00:00
JamesTran-MSFT 29,141 Reputation points Microsoft Employee
2 answers

The 'Connect-PnPOnline' command was found in the module 'PnP.PowerShell', but the module could not be loaded.

I want to connect to PnP.PowerShell, but when I execute this command: Connect-PnPOnline -Url <> -Interactive I obtain this error: Connect-PnPOnline : The 'Connect-PnPOnline' command was found in the module 'PnP.PowerShell', but the module could not…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-19T13:20:57.9266667+00:00
Sophie von Brühl 0 Reputation points
answered 2023-05-26T15:12:41.3133333+00:00
Sophie von Brühl 0 Reputation points
2 answers

High CPU usage for vmmem

Hi, I have experienced high CPU usage for Vmmem frequently (~every 2days) and the only solution at the moment is simply restart my machine. It is understood that is related to WSL and I do have a Docker image running on Ubuntu on Windows. However it is…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
7,435 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-03-21T19:12:59.2566667+00:00
Steve Lo 15 Reputation points
commented 2023-05-26T14:34:51.1166667+00:00
Jiri Hajek 0 Reputation points
0 answers

Is Microsoft.Graph.Mail for powershell free ?

Hello everybody, I want to access mail messages from a shared mailbox in EXOL with powershell. After some digging it seems like microsoft.graph.mail is best suited for this task. Microsoft says on one of their websites, accessing data with the graph API…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
1,288 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-26T12:01:34.2666667+00:00
chris_2384 0 Reputation points
2 answers

How can I use New-CsApplicationAccessPolicy -identity $policyName on macos?

Hi Microsoft team, I try to Configure the application access policy but when I tried following this docs: https://learn.microsoft.com/en-us/graph/cloud-communication-online-meeting-application-access-policy in the step Create an application access policy…

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
6,541 questions
Microsoft Graph Applications API
Microsoft Graph Applications API
A Microsoft API that enables you to manage these resources and actions related to applications in Azure Active Directory.
559 questions
Microsoft Graph Azure AD API
Microsoft Graph Azure AD API
A Microsoft API that queries the user's profile, finds other users, manages organizational relationships, tracks assignments, or creates original solutions that incorporate existing organizational data.
252 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.
2,068 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
694 questions
asked 2023-05-08T03:59:18.1333333+00:00
Đức Tri Bùi Quang 5 Reputation points
commented 2023-05-26T10:18:51.16+00:00
CarlZhao-MSFT 23,031 Reputation points