2,577 questions with PowerShell-related tags

Sort by: Updated
1 answer

Update-AzVM will not assinged a user defined identity

Hello, I am creating a set o virtual machines and need to assign them a user defined identity. This code below at the last command returns everything is ok but at the Azure portal the identity is not assigned. I still can assing it at the portal but…

Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,026 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-11-02T12:38:59.3966667+00:00
Jan Vávra 321 Reputation points
answered 2024-11-02T23:26:56.17+00:00
Luis Arias 6,966 Reputation points
1 answer

How can I Uninstall MS SARA for Enterprise via PowerShell?

Hello, I am looking for a way to uninstall MS SARA for Enterprise via PowerShell. I have looked at the SARA for Enterprise documentation, and it does not give any guidance on this matter. Note: I am an IT Technician trying to automate our PC build…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-10-18T19:28:45.5266667+00:00
Joshua Larson 0 Reputation points
answered 2024-11-02T18:05:14.6566667+00:00
DavidChristiansson 75 Reputation points
1 answer

Disabling OneDrive Access and Removing Data for Specific Users via PowerShell

I would like to explore options for deleting specific users' OneDrive data using a PowerShell script. I have around 1500+ active users with OneDrive access, and I want to disable OneDrive access for around 500+ specific users and remove the files from…

OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,269 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-11-02T09:58:12.0833333+00:00
Muhammad Faraz Imran 0 Reputation points
answered 2024-11-02T15:25:26.97+00:00
Vasil Michev 107.3K Reputation points MVP
4 answers

Starting applications from MsAccess VBA using shell, can take seconds !!

My MsAccess program is starting task using the VBA Shell version. Starting a program using shell() should take a couple of milliseconds, and sometimes it works that way, but frequently it takes seconds (3.5) !! Not workable at all! Some info: I am…

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,081 questions
Access
Access
A family of Microsoft relational database management systems designed for ease of use.
399 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,847 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-09-07T12:17:29.5433333+00:00
louis1-6497 0 Reputation points
edited the question 2024-11-02T08:55:30.6733333+00:00
simo-k 555 Reputation points
1 answer One of the answers was accepted by the question author.

Read SCIM provisioning configuration of Service Principal

How to read SCIM provisioning configuration of Service Principal using PowerShell or Graph API? Regards

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,226 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 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,070 questions
asked 2024-11-01T19:00:21.0633333+00:00
Rafal Fraczek 60 Reputation points
accepted 2024-11-02T08:10:01.1466667+00:00
Rafal Fraczek 60 Reputation points
2 answers One of the answers was accepted by the question author.

powershell to get all users and their managers recursively

I am looking to pull all Active Directory users and their managers all the way up to the chain. I get how to do get-aduser -filter * -properties * | select name, manager export-csv -path "csv path" I also get: $Users = Get-ADUser -filter *…

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,622 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,546 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-04-30T13:24:36.5566667+00:00
Michael-5966 20 Reputation points
commented 2024-11-02T04:10:34.9833333+00:00
Abhishek Rawat 0 Reputation points
0 answers

Automate daily checks for Azure VMs

Hello, I would like to check the CPU percentage, Disk IOPS, and Memory availability values of Azure VMs daily in an Excel file. I am considering using Azure Automation for this. Is there a script that I can refer to for automating the process of…

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,257 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-10-31T06:59:26.9133333+00:00
Yu-Jeong Seo 90 Reputation points
commented 2024-11-02T03:39:25.39+00:00
Ryan Hill 28,386 Reputation points Microsoft Employee
1 answer

Connect to CloudShell

Hi, I have granted one of my users access to Azure Kubernetes Service. The user wants to connect to Azure Cloud Shell from the Azure portal but is unable to do so, as connecting to Azure Cloud Shell requires a storage account, and the user does not have…

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.
827 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,142 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-11-01T12:05:31.2566667+00:00
Roger Roger 6,326 Reputation points
commented 2024-11-01T18:50:42.19+00:00
Mahesh Goud Juvvadi 1,070 Reputation points Microsoft Vendor
1 answer

Connect-SPOService : No valid OAuth 2.0 authentication session exists ?

I have not been able to connect using the command “Connect-SPOService -Url https://company-admin.sharepoint.com” for several months now. I pick account Enter password click "Next" And get this empty "working..." window…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,793 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-11-01T12:21:58.72+00:00
Matthias Müller | TESVOLT AG 0 Reputation points
answered 2024-11-01T17:39:20.79+00:00
Vasil Michev 107.3K Reputation points MVP
0 answers

Add a local IPP printer queue programmatically or with Powershell when Windows protected print mode is enabled

After enabling Windows protected print mode I am no longer able to add a printer queue programmatically using the Win32 API nor using Powershell. Windows protected print mode requires me to use the built-in driver called Microsoft IPP Class Driver. The…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,649 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
688 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-11-01T16:27:40.0233333+00:00
Jan 5 Reputation points
0 answers

Install a local IPP printer queue programmatically or with Powershell when Windows protected print mode is enabled

After enabling Windows protected print mode I am no longer able to add a printer queue programmatically using the Win32 API nor using Powershell. Windows protected print mode requires me to use the built-in driver called Microsoft IPP Class Driver. It…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,649 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
688 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,847 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-11-01T16:21:16.49+00:00
Jan 5 Reputation points
3 answers

Script to request and get access token from Microsoft graph API with certificate instead of client secret

I want to avoid using the standard MSGraph or AzureAD modules by using Invoke-WebRequest. There are plenty of examples on how to use a client secret for App Registration authentication with Invoke-WebRequest. The below is from Vasil Michev's excellent…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,226 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 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,070 questions
asked 2024-10-31T19:08:22.47+00:00
bezell-6128 21 Reputation points
commented 2024-11-01T12:53:54.2533333+00:00
Vasil Michev 107.3K Reputation points MVP
0 answers

Restore OneDrive files in bulk from Preservation Library

Is there a way to pull files from the OneDrive Preservation library in bulk? User had two computers and had OneDrive sync'd on both. While in the process of issues they lost their OneDrive files and had cleared the trash. They are all now located in the…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-10-31T18:21:50.07+00:00
Monroe, Michael 0 Reputation points
0 answers

How to assign Static Private IP address to Network interface of replicated item under Azure Recovery service vault using PowerShell

Using below script to assign Virtual network and static IP to replicated item under Recovery service vault. Script successfully assigns virtual network and static IP to the replicated item as per Job status. But static IP is not reflecting on Azure…

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,491 questions
Azure Site Recovery
Azure Site Recovery
An Azure native disaster recovery service. Previously known as Microsoft Azure Hyper-V Recovery Manager.
717 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-10-29T08:52:04.4633333+00:00
Vinmay Parkhi 0 Reputation points
commented 2024-10-31T04:10:50.49+00:00
Vinmay Parkhi 0 Reputation points
0 answers

Resource "some application ID" does not exist or one of its queried reference-property objects are not present.

When I run: Get-MgApplication | FL DisplayName, AppID I get some application IDs and when I run: Get-MgApplication -ApplicationId "any application ID from above" it shows: Get-MgApplication : Resource 'xxxxxxxxxxxxxxxxxx' does not exist or one…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
Microsoft Entra
asked 2024-10-31T04:03:51.1866667+00:00
Michael Chong 0 Reputation points
commented 2024-10-31T04:05:59.3933333+00:00
Michael Chong 0 Reputation points
0 answers

Resource '<application ID' does not exist or one of its queried reference-property objects are not present.

So I run: Get-MgApplication | FL DisplayName, AppID And I get some application IDs And when I run: Get-MgApplication -ApplicationId "<any application ID listed from above>" It all says: Get-MgApplication : Resource…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
Microsoft Entra
asked 2024-10-31T03:55:40.43+00:00
Michael Chong 0 Reputation points
0 answers

How to Exclude a User from Auditpol - Discovered a possible bug with auditpol.exe

Hello all, I am trying to exclude a user from being audited on a Server 2019 Domain Controller. Using the following: Auditpol /set /user:adm.svc.acc /subcategory:"Logon" /Success:disable Reason for doing so, it's a service account that is…

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,785 questions
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,479 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,622 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-10-01T03:22:54.2133333+00:00
muttBunch 100 Reputation points
edited the question 2024-10-31T02:51:26.9566667+00:00
muttBunch 100 Reputation points
1 answer

Intune script that will check the uptime of each machine in the organization and restart laptop after checks

Hello everyone, I need your help, please, because I’m feeling desperate. I want to create a detection and a remediation script in Intune. As a result, I would like it to check if the uptime of each machine reaches 5 days and send a warning to the user:…

Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
5,176 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-10-23T10:24:26.2633333+00:00
Christos Christopoulos 20 Reputation points
answered 2024-10-30T11:12:29.3733333+00:00
Pavel yannara Mirochnitchenko 12,596 Reputation points MVP
3 answers

Change PowerShell Font when "run as administrator"

Hey,I tried to change the font of the powershell and it was easy. However, every time I let it "run as administrator", it will use the system default font and will be reset even I change it (doesn't affect normal run- not admin). I looked…

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,546 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2024-02-15T23:39:51.4333333+00:00
Brian C 0 Reputation points
answered 2024-10-29T18:56:47.8466667+00:00
Rich Matheisen 46,806 Reputation points
3 answers

Delete multiple members of distribution group using CSV thru Exchange Management Shell On Premise

I received a request from our employees to delete all the members of this particular distribution group within our organization, and upon checking this DL has a total of 7,000 members. Is there any powershell script I can use to delete just the members…

Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,333 questions
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,662 questions
Microsoft Exchange
Microsoft Exchange
Microsoft messaging and collaboration software.
560 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,725 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
asked 2023-03-02T02:49:39.17+00:00
Gatchalian, AD 25 Reputation points
answered 2024-10-29T15:39:40.9266667+00:00
Hilton, Brett 0 Reputation points