2,272 questions with PowerShell-related tags

Sort by: Updated
0 answers

Getting error while running the command on AZ powershell

While running microsoft graph commands on azpowershell getting this error

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-20T06:25:03.2366667+00:00
arsh preet 0 Reputation points
commented 2024-06-20T06:25:46.82+00:00
arsh preet 0 Reputation points
2 answers One of the answers was accepted by the question author.

How can I calculate a persons age in Powershell

I very new to Powershell so appologise for probably asking a very basic question. I need to write a script to show how old a member of staff is in years and months. I need to convert a string that is in the format of "25-09-1973" to a date…

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-18T15:23:58.28+00:00
Billy the Mexican 25 Reputation points
commented 2024-06-19T15:45:46.2133333+00:00
Rich Matheisen 45,591 Reputation points
1 answer

Issue with PowerShell script copying files between blob containers

Hello team, I am experiencing issues with a PowerShell script that copies files from one blob container to another. Specifically, I am trying to run this script from a function app. Can anyone assist me in resolving this issue?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,564 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,867 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-19T12:21:43.93+00:00
sai pavan 20 Reputation points
answered 2024-06-19T12:53:40.5233333+00:00
Amol Shelar 421 Reputation points
0 answers

How to expand PowerShell MS Graph Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject Microsoft.Graph.PowerShell.Models.MicrosoftGraphVerifiedPublisher?

Using PowerShell for Microsoft Graphs, how can I expand or convert the below attributes or columns? CreatedOnBehalfOf : Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject VerifiedPublisher :…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,247 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
Microsoft Entra
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-19T11:15:12.33+00:00
EnterpriseArchitect 5,016 Reputation points
edited the question 2024-06-19T11:16:02.19+00:00
EnterpriseArchitect 5,016 Reputation points
0 answers

Need Help Disabling Windows Firewall Profiles via PowerShell for Ansible Automation

We have a requirement to set Windows Firewall profiles to "off" using Ansible Automation. Despite various attempts, the profiles reset/enabling upon reboot due to Group Policies. I am not able to disable the windows firewall profiles through…

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-14T23:56:32.2766667+00:00
Ambika Singh 0 Reputation points
commented 2024-06-18T20:36:58.0366667+00:00
MotoX80 32,551 Reputation points
1 answer

Can't use powershell to connect to Azure AD with a Google authentication account

Hi there, I'm trying to connect my Powershell to Azure AD. After inputting connect-azuread and inputting my account in the pop-up browser, there will be an error message from Google at last. I tried to use the credential from a successful command…

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.
4,997 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-17T07:59:12.73+00:00
Bruce Wang 0 Reputation points
commented 2024-06-18T10:16:54.08+00:00
Bruce Wang 0 Reputation points
0 answers

About PS script

My requirements are My Azure AD users have company name attributes some have same names and some have different and some have no company name attribute Same company name atrribute users must see the calender of each other but different company name…

Outlook
Outlook
A family of Microsoft email and calendar products.
3,327 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-10T01:50:53.0733333+00:00
ネパリ サンデャ 380 Reputation points
edited the question 2024-06-18T08:44:51.8+00:00
Givary-MSFT 30,251 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

Ways on how to manage azure Devices and Find device location per office

Hi, Im on creating some automation to delete all stale devices in Entra ID (not in intune) and i need to find a way to find each device location so i can separate them every office. are there any ways to check the device location or physcial location? im…

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
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-04T13:06:28.0866667+00:00
Darren Ramos 40 Reputation points
accepted 2024-06-18T07:30:41.23+00:00
Darren Ramos 40 Reputation points
1 answer One of the answers was accepted by the question author.

Disable "Allow this computer to turn off this device to save power" for I2C HID device solely

My laptop just randomly disabled my touchpad and I found out that the checkbox: "Allow the computer to turn off the devices" may be the problem. So I think the powershell script or registry could turn that checkbox off on startup, but don't…

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-17T10:48:44.7766667+00:00
Pham Cao Cuong 20 Reputation points
accepted 2024-06-18T05:48:16.1533333+00:00
Pham Cao Cuong 20 Reputation points
0 answers

After federating a domain, it takes 15 minutes for Azure to reflect that

When I run this command: $domain = "contoso.com" Set-MsolDomainAuthentication -DomainName $domain -FederationBrandName "SethCall" -Authentication federated -IssuerUri $issueruri -ActiveLogOnUri $LogOnUrl -PassiveLogOnUri …

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-16T13:26:34.5866667+00:00
Seth Call 0 Reputation points
commented 2024-06-17T15:39:33.2766667+00:00
Rich Matheisen 45,591 Reputation points
3 answers One of the answers was accepted by the question author.

Parallel copy of files on multiple servers

I want to copy all the files in a folder called test from ServerA to multiple Servers. I am using command like below, however it is not copying the files: Executing the below script from ServerA $serverlist = New-PSSession -ComputerName ( Get-Content…

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-13T12:30:07.6566667+00:00
Sam White 26 Reputation points
commented 2024-06-17T15:26:02.08+00:00
Rich Matheisen 45,591 Reputation points
1 answer

Connect-ExchangeOnline started giving a strange error

Hello all, I created a script in powershell to collect mailbox information from our tenants on Exchange Online. It stopped working somewhere aroung the 1st of May. Im going to explain what my process is in some detail and when the error occurs. There are…

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,341 questions
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
327 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-12T09:01:52.5533333+00:00
Milos Boksan 0 Reputation points
answered 2024-06-17T14:52:21.91+00:00
Milos Boksan 0 Reputation points
1 answer

How to enable schedule patching on azure vm using powershell

I am using below command as per documentation https://learn.microsoft.com/en-us/azure/update-manager/prerequsite-for-schedule-patching?tabs=new-prereq-powershell%2Cauto-portal&WT.mc_id=Portal-Microsoft_Azure_Automation#code-try-4 But it is asking to…

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 Update Manager
Azure Update Manager
An Azure service to centrally manages updates and compliance at scale.
267 questions
asked 2024-05-10T11:18:38+00:00
Azuretech 90 Reputation points
commented 2024-06-17T09:18:46.51+00:00
techazure 0 Reputation points
1 answer

Need to add line for reboot

Hi, I have a script that is working, but I need to add a line to restart the machine after 8 hours and it should give a notification as well. I will deploy this script using Intune through the Win32 method, so I also need to know what detection logic to…

Microsoft System Center
Microsoft System Center
A suite of Microsoft systems management products that offer solutions for managing datacenter resources, private clouds, and client devices.
894 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,661 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-14T20:31:40.54+00:00
TechUST 516 Reputation points
commented 2024-06-15T20:31:43.8433333+00:00
TechUST 516 Reputation points
1 answer

Can I get the Powershell script to block the users sign-in and remove the licenses and convert the usermailbox to sharedMailbox and assign the sharedmailbox to someone else by using script in M365 by using input file?

Can I get the Powershell script to block the users sign-in and remove the licenses and convert the usermailbox to sharedMailbox and assign the sharedmailbox to someone else by using script in M365 by using input file?

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
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,341 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-02-25T09:47:29.08+00:00
Vinod Survase 4,716 Reputation points
answered 2024-06-14T22:59:13.5633333+00:00
Miguel Gonçalves | AVANADE 886 Reputation points
1 answer

Script to loop through a CSV file and to exit loop once all users have been licensed in M365

Hi all, I have an input CSV file like this: UserPrincipalName user1@test.com user2@test.com When I license these users in M365, it can take a couple of moments for the Get-MSolUser "IsLicensed" attribute to be set to "True". I would…

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
Microsoft Exchange Licensing
Microsoft Exchange Licensing
Microsoft Exchange: Microsoft messaging and collaboration software.Licensing: Rules, regulations, and restrictions that define how software can be used and distributed.
13 questions
asked 2024-06-14T21:24:03.0433333+00:00
mark terry 45 Reputation points
edited an answer 2024-06-14T22:21:42.52+00:00
Miguel Gonçalves | AVANADE 886 Reputation points
1 answer

Enable applocker powershell commandlets in Home versions of Windows

According to this site, I should be able to apply local applocker polices on Home versions of Windows. I cannot get the Set-AppLockerPolicy command to run in powershell. I am running Windows 10 Home Version 22H2 (OS Build 19045.4529). I have applied…

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-13T19:10:56.8166667+00:00
Lorne Martin 0 Reputation points
answered 2024-06-14T00:46:05.83+00:00
Ian Xue (Shanghai Wicresoft Co., Ltd.) 33,071 Reputation points Microsoft Vendor
3 answers

Move mails from one folder to another folder via powershell script for all mailboxes

Hello, Recently, I have done a cross tenant mailbox migration by manually export and import pst procedure. Now, I have been facing an issue. My all mails were imported in outlook on the web under TargetRootFolder which created by System. Now, I want to…

Microsoft Exchange Online
Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
5,036 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-07-30T08:08:15.3733333+00:00
Md. Rubiat Haque 151 Reputation points
answered 2024-06-13T20:32:50.0533333+00:00
35874177 0 Reputation points
2 answers

powershell script to check all Entra ID Role Assignment Members

Hi, Im checking on how i can manage to get all members of Entra ID Role Assignment and Administrators. when i try to export the file only the Scope with Directory is exported, not all members are exported. When i tried the Get-AzureADDirectoryRoleMember…

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-13T11:31:12.8933333+00:00
Darren Ramos 40 Reputation points
answered 2024-06-13T16:47:46.06+00:00
Vasil Michev 99,126 Reputation points MVP
2 answers

Cannot run New-AzActionGroup after New-AzActionGroupReceiver

Hello, I am trying to create a new action group using PS. The group will use webhook. To achieve this I need to create an action group receiver. Code: $ActionGroupShortName = 'Alert' $ActionGroupReceiverName =…

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,968 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-05-16T10:59:45.49+00:00
Oleg Tserkovnyuk 586 Reputation points
edited an answer 2024-06-13T13:43:04.4266667+00:00
Oleg Tserkovnyuk 586 Reputation points