2,706 questions with PowerShell-related tags

Sort by: Updated
0 answers

How to fix this issues as I got the access token and powershell sdk of connnection through Graph. Still I am facing this error message.

PS C:\Users\Hritik Raushan> Get-MgUser Get-MgUser : Expected comma, literal, or object. Was Eof: . At line:1 char:1 Get-MgUser + CategoryInfo : NotSpecified: (:) [Get-MgUser_List], ParserException + FullyQualifiedErrorId :…

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,375 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,658 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,653 questions
asked 2024-12-26T11:18:49.6766667+00:00
Hritik Raushan 0 Reputation points
commented 2024-12-27T02:33:47.34+00:00
CarlZhao-MSFT 43,801 Reputation points
2 answers

App-only authentication for unattended scripts

Hi Team, We are developing an integration that will use the authentication (App-only authentication for unattended scripts) mechanism to integrate with Security & Compliance PowerShell. The article…

Microsoft Exchange Online
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-23T07:49:50.55+00:00
Abd El-aziem, Ahmed Saeed 0 Reputation points
commented 2024-12-27T02:09:27.0166667+00:00
Jake Zhang-MSFT 7,850 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Powershell to create logsearch in bulk for azure vm's to check lowdiskspace

Hello, We have hundreds of Virtual machines on azure wanted to automate the script with PowerShell to create alert that checks the low space 95% for c and d. Manual process and query works just fine and we do get P1 alerts. But automatic this with…

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,396 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-11T19:56:05.9833333+00:00
Ladi-1118 0 Reputation points
accepted 2024-12-26T16:57:45.1266667+00:00
Ladi-1118 0 Reputation points
1 answer

How we can create SessionHost in Azure Virtual Desktop using Azure Powershell?

Hi I am having one requirement where I need to create SessionHost VMs using Command Line , I followed references on Az.DesktopVirtualization Module where we have Cmdlet like New-AzWVDHostPool. Do we have similar cmdlet to create SessionHost as well? …

Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,624 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-23T07:53:30.8733333+00:00
Hirdesh Baghel 20 Reputation points
commented 2024-12-26T12:53:28.0466667+00:00
Nikhil Duserla 3,565 Reputation points Microsoft Vendor
1 answer

How to use powershell to add multiple resources to a maintenance configuration in Azure Update Manager?

Hi Team, I am trying to add resources in Maintenance Configurations in Azure Update Manager using PowerShell using the following Script - # Install the Az.Maintenance module if you haven't already Install-Module -Name Az.Maintenance -Force #…

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,174 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-21T04:00:14.7033333+00:00
Somesh K Tiwari 0 Reputation points
commented 2024-12-26T01:04:58.46+00:00
anashetty 1,150 Reputation points Microsoft Vendor
1 answer

WSL2 not working properly on Windows. Required to disable network.

Having issues with launching any linux distro within Windows. For context it was working, and on Jan 29th it stopped working. There was a Powershell v7.3.11 update on windows but I don't believe it was working. Currently I'm trying to launch WSL2 using…

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,774 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-02-12T19:13:40.7933333+00:00
cfort55 85 Reputation points
answered 2024-12-26T00:31:05.9333333+00:00
Willy Pete 0 Reputation points
1 answer

PS script, request for user credential, run a few commands and signs out domain user when script ends

How do I write a PowerShell script that asks for user's credentials and run the next few commands as the new user. Once the commands complete, signs out the users Script: #Get user domain/user credentials $USRCreds = Get-Credential #Run the next few…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-23T17:01:32.28+00:00
Cody 321 Reputation points
commented 2024-12-24T20:27:08.2533333+00:00
MotoX80 34,856 Reputation points
1 answer

Test-Connectivity fails for address *.cdn.office.net, getting name resolution failed

Microsoft has announced an update to the global endpoint for the automatic update of the Remote Desktop Client application, with the new address being *.cdn.office.net. However, when testing the connectivity via PowerShell, an error is encountered,…

Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,624 questions
Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,654 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-12T07:38:45.34+00:00
Nazeer, Shalomon 25 Reputation points
edited an answer 2024-12-24T08:00:12.13+00:00
Prrudram-MSFT 27,251 Reputation points
1 answer

New-AzApiManagementSubscription doesn't seems to work

Hi, I try to use in my Pwoershell script command : New-AzApiManagementSubscription to create a sunscription and add it to a Prodcut, but when I try it with different paramaters/syntax: CreateResult = New-AzApiManagementSubscription ` -Context…

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,239 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-19T09:51:27.47+00:00
Eric Franckx 45 Reputation points
commented 2024-12-24T04:56:15.95+00:00
VenkateshDodda-MSFT 23,141 Reputation points Microsoft Employee
1 answer

Guidance Needed: Report on Libraries and Subfolder Permissions in SPO Site

Hi All, I have a requirement to generate a report of all libraries and their subfolder permissions from a SharePoint Online (SPO) site. I have already tried a few scripts from the internet, but none seem to fulfill this requirement. Any guidance would be…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,001 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,158 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-13T15:45:13.19+00:00
Santhosh Kumar 0 Reputation points
commented 2024-12-24T01:25:09.6466667+00:00
AllenXu-MSFT 22,156 Reputation points Microsoft Vendor
1 answer

How to Add a VM (Session Host ) to Hostpool in Azure Virtual Desktop

Hi I am working on one powershell script to automate Hostpool and SessionHost creation. I have created one VM using (New-AzVM ) Cmdlet. Now I am trying to add this vm to Hostpool as SessionHost. But could not find any relevant resources to do the…

Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,624 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-19T13:06:07.6566667+00:00
Hirdesh Baghel 20 Reputation points
commented 2024-12-23T18:08:31.6433333+00:00
Akshay kumar Mandha 1,655 Reputation points Microsoft Vendor
1 answer

Best Approach to Block Incoming Traffic During Initial Cache Loading in Azure VMSS

I am setting up a VMSS (Virtual Machine Scale Set) for a web application, and I need to perform an initial load of objects into the cache. To achieve this, I would like to open a web page on localhost to load the objects into the cache, but I don't want…

Azure Web Application Firewall
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
463 questions
Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
423 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-22T15:42:48.31+00:00
ShlomiDror-7850 0 Reputation points
answered 2024-12-23T09:54:24.0166667+00:00
KapilAnanth-MSFT 48,081 Reputation points Microsoft Employee
1 answer

Images imported in SharePoint page's text webpart disappear when switched to edit mode

I have migrated content from the customer's CMS to SharePoint online pages. I'm importing html-data to text webpart and everything works quite nicely. But when I start editing page all images inside the text area will disappear. I have checked the html…

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,158 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-20T11:53:47.53+00:00
Antti Mikkonen 96 Reputation points
edited the question 2024-12-23T07:27:56.86+00:00
Yanli Jiang - MSFT 28,041 Reputation points Microsoft Vendor
2 answers

How I pin a lnk to start screen only in powershell

Hi Team I am the application developer on Ford provingground. I get the job to automate deployment on tablets on my side. The only issue that a have is to pin link to the start menu with powershell, but I did all sort of thing. But it don't work,…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,908 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,280 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-17T07:27:07.4033333+00:00
Gerrits, Marc (M.) 0 Reputation points
commented 2024-12-23T07:20:28.43+00:00
Gerrits, Marc (M.) 0 Reputation points
4 answers

Get-MgServicePrincipal not returning anything for either AppRoles or OAuth2PermissionGrants

Describe the bug Get-MgServicePrincipal doesn't return anything for the AppRoles or OAuth2PermissionGrants, despite the SP having both Delegated and App Perms assigned. I am a Global Administrator, so I don't suspect a permission issue, especially…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,658 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,653 questions
asked 2023-08-11T19:53:35.7166667+00:00
Johnathan Welker 106 Reputation points
answered 2024-12-20T15:58:51.89+00:00
Filippo Iacobellis 90 Reputation points
1 answer One of the answers was accepted by the question author.

How to remove Accepted Senders from O365 Group in PowerShell

Hi, I'm using PowerShell to edit O365 (Unified Groups). I'm able to create, and edit (add/remove) members of groups. I'm also able to add accepted senders to a group. I failed to remove accepted senders from a group. I tried using…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,658 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-19T15:54:33.0666667+00:00
Grzegorz Gutowski 20 Reputation points
commented 2024-12-20T13:36:32.97+00:00
Grzegorz Gutowski 20 Reputation points
2 answers

SharePoint External links audit

Good afternoon! I have a task to create a PowerShell code to check all shared links from our SharePoint site, regardless of when they were created. The current limit is 180 days. Is it possible to use PowerShell to check for the entire period? We need to…

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,158 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-05T17:01:05.8233333+00:00
Dmytro Novitnii 0 Reputation points
commented 2024-12-20T10:19:47.4866667+00:00
Yanli Jiang - MSFT 28,041 Reputation points Microsoft Vendor
0 answers

Load Testing for Azure Virtual Desktop (AVD) Using PowerShell

Hi, I've created a PowerShell script sourced from the web to perform load testing (also known as synthetic testing) by simulating multiple users accessing servers in Azure Virtual Desktop (AVD). However, I've encountered a blocker while generating an…

Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,624 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-20T07:58:35.2666667+00:00
Azim 26 Reputation points
commented 2024-12-20T08:18:32.9866667+00:00
Deepanshu katara 12,635 Reputation points
2 answers

Exception calling "ParseExact" when processing a certain date

I keep getting "Exception calling "ParseExact" with "3" argument(s): "String 'Oct 31 04:53:31 2024' was not recognized as a valid DateTime."" when trying to parse "Thu Oct 31 04:53:31 +0100 2024" this…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,908 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2024-12-12T03:21:23.4333333+00:00
Gabriel 0 Reputation points
commented 2024-12-19T16:10:54.1066667+00:00
Rich Matheisen 47,481 Reputation points
3 answers

How to change Azure VM Resolution

Hi I am having one powershell windows form with hardcoded width and height of 1600 and 950 respectively. This forms displays fine when I am using my local machine(the same machine on which I have developed this form) which is having resolution (1920x1080…

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,174 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,706 questions
asked 2023-10-18T13:36:07.04+00:00
Hirdesh Baghel 20 Reputation points
commented 2024-12-19T10:59:53.82+00:00
Carlos Quintas 0 Reputation points