2,158 questions with PowerShell-related tags

Sort by: Updated
2 answers One of the answers was accepted by the question author.

Powershell script + SMTP email

Hello, I have the following script edited by my co-worker (it's our IP) with my own personal modification. I have basic skills in powershell so I'm not a master. The goal is to send an email to the user as soon as he hits a 14-day countdown until…

Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,108 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,389 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,406 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-01-20T14:10:44+00:00
Kevin Savard Vertisoft 86 Reputation points
edited the question 2023-02-13T06:58:19.0066667+00:00
Yuki Sun-MSFT 40,881 Reputation points
1 answer One of the answers was accepted by the question author.

How to set msExchMailboxGuid with Set-ADUser command

Hi all, I get users information (PrimarySMTPAddress,Alias,SamAccountName,FirstName,LastName,DisplayName,Name,ExchangeGuid,ArchiveGuid,LegacyExchangeDn,EmailAddresses) by Get-Mailbox command Then export them to XML file (Export-Clixml) or CSV file…

Microsoft Exchange Online
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,994 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,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,158 questions
asked 2023-02-10T07:45:29.95+00:00
Jack Chuong 356 Reputation points
edited the question 2023-02-13T06:50:30.6733333+00:00
Kael Yao-MSFT 37,576 Reputation points Microsoft Vendor
2 answers

How to fix the null index array error in powershell?

I am trying to run a PowerShell script which is taking three input PAT, organization and connection string of the database. But, When I run the script I am facing an issue i.e it throws a null index array. Attaching screenshot of the error and script for…

Azure SQL Database
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-11T06:08:53.58+00:00
Abhishek Singh (Contractor) 21 Reputation points
edited the question 2023-02-13T03:57:32.46+00:00
Abhishek Singh (Contractor) 21 Reputation points
2 answers

How to change Office language in bulk

We have thousands of users in the Mekong Valley and they have requested to change their Office language. Is there a way to do this within Intune?

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,359 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,476 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-10T18:11:21.1333333+00:00
Justin Lee 61 Reputation points
answered 2023-02-13T02:14:31.8833333+00:00
Crystal-MSFT 44,411 Reputation points Microsoft Vendor
1 answer

seem MS abandoned powershell

Why does is seem like anything that has to do with PowerShell is half assed MS how can you let this happen?

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-12T01:20:51.24+00:00
Finneus 0 Reputation points
answered 2023-02-12T16:41:16.72+00:00
Rich Matheisen 45,111 Reputation points
2 answers

Basic Powershell Azure Connection

OK, I admit, I am behind the curve. I have been using PowerShell and getting my commands to work as a sysadmin for some time, and things were fine. Now I am learning that the latest is PowerShell 7 and PowerShell graph andmy connections are not working…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-10T22:03:48.8733333+00:00
stay puft 221 Reputation points
answered 2023-02-11T03:49:45.1+00:00
Spencer 6 Reputation points
0 answers

Powershell check file modified date & send email if updated (only once)

Script sends email if a new file is found in that folder. And does not send email if already been sent. Runs every hour in the windows task scheduler. Can you check the code? Maybe you can tell me how to fix it and optimize it. Thank you. $TodayDate =…

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,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,158 questions
asked 2023-02-10T20:02:26.3733333+00:00
Pavel Kuznetsov 0 Reputation points
edited the question 2023-02-11T01:23:11.3766667+00:00
Pavel Kuznetsov 0 Reputation points
1 answer

Script to remove all user profiles from a workstation except global user and admin

Hello. I'm looking for help with a script to remove user profiles that have logged into a workstation other than the local Admin and Global users. Thanks.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,808 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-10T15:53:19.5066667+00:00
PauloValentim-2701 0 Reputation points
answered 2023-02-10T18:08:58.2+00:00
MotoX80 32,246 Reputation points
1 answer One of the answers was accepted by the question author.

For SharePoint Online permissions, How to have this checkbox unchecked by default?

Hi there, On SharePoint Online, while grating permissions on a folder, the checkbox to grant permissions on subfolders even if they have unique permissions is checked by default. How to have this checkbox unchecked by default? Any PowerShell, or any…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,860 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-08T01:00:06.5066667+00:00
frob 4,216 Reputation points
accepted 2023-02-10T16:55:30.5266667+00:00
frob 4,216 Reputation points
1 answer One of the answers was accepted by the question author.

On SharePoint Online, is there a way to block unique permissions on files and folders (forcing users to use a folder on the top level when new permissions are needed)?

Hi there On SharePoint Online, is there a way to block unique permissions in a document library (so only the top-level folders can have unique permissions, but none of the sub-folders)? When users cannot create unique permissions, they will be forced to…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,860 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-08T00:55:58.5033333+00:00
frob 4,216 Reputation points
accepted 2023-02-10T16:54:46.51+00:00
frob 4,216 Reputation points
7 answers

Howto delete powershell transcript files with intune

Hi there, we have several powershell scripts that are using the command start-transcript to do a kind of debug logging when running via the Intune Management Engine. Those files are stored in the default Intune Folder in…

Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,476 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-08T15:35:55.9+00:00
Shorty 0 Reputation points
edited an answer 2023-02-10T16:35:33.0466667+00:00
MotoX80 32,246 Reputation points
2 answers One of the answers was accepted by the question author.

The term '-SysvolPath' is not recognized..?!

Hi, I have the following Powershell script : $password = ConvertTo-SecureString "Password" -AsPlainText -Force $cred = New-Object System.Management.Automation.PSCredential ("Administrator", $password) Install-WindowsFeature -name…

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,284 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,406 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-10T11:39:29.0466667+00:00
touqeeranjum 80 Reputation points
commented 2023-02-10T15:46:23.78+00:00
touqeeranjum 80 Reputation points
1 answer One of the answers was accepted by the question author.

What is the different between New-MgGroupMember and New-MgGroupMemberByRef?

Hi All, I am curious, what is the difference between using New-MgGroupMember and New-MgGroupMemberByRef? I know how to use them both and I know for New-MgGroupMemberByRef you need to use an Odata bind defined within a hashtable. But why are there…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,832 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-09T10:02:37.0933333+00:00
!Daniel Bradley 1,056 Reputation points MVP
accepted 2023-02-10T08:59:03.61+00:00
!Daniel Bradley 1,056 Reputation points MVP
3 answers One of the answers was accepted by the question author.

The value of parameter imageReference.sku is invalid while creating the VM using Azure PowerShell

I'm trying to create a Windows 2016 Datacenter Virtual Machine using Azure PowerShell. Created the Resource Group Created the Storage Account Location is Central India Created the VNet, Subnet Created NSG Rule with NSG Group Created Public IP, VM…

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,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,158 questions
asked 2023-02-02T16:39:32.9266667+00:00
krishna572 876 Reputation points
accepted 2023-02-09T17:15:13.89+00:00
krishna572 876 Reputation points
2 answers

How to obtain Major.Minor.Version.Patch details from PowerShell

Hello everyone, I happen to use following command to obtain operating system version details. cmd /ver The same command cannot be used when called in a PowerShell script like following. Why? because it opens a shell; and control remain stuck there. …

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-09T05:16:38.46+00:00
Nitin Singh 20 Reputation points
answered 2023-02-09T15:36:30.0033333+00:00
Limitless Technology 44,001 Reputation points
1 answer

VS-Code loaded project not showing in default project for package manager console NuGet package

I am trying to work on and get a powershell script running that requires the MS Exchange WebServices dll from NuGet, when i try to load the script as a project in VS Code and install the dll as a package from NuGet via the Package Manager Console it…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-07T22:40:11.6733333+00:00
pwbguy 21 Reputation points
answered 2023-02-09T15:35:02.02+00:00
Limitless Technology 44,001 Reputation points
1 answer

how do i edit path from variable?

I have in multiple locations text files named pc01; pc02; pc03 and so on up to pc18. I want to go through them in order and get the contant into a single file. here's the script I use for example: $source =…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-09T09:25:28.2033333+00:00
שימי רוזנברג 1 Reputation point
answered 2023-02-09T14:23:06.7+00:00
MotoX80 32,246 Reputation points
2 answers

How to open a word document on another computer remotely using powershell.

There has to be a way to open a Word document onto a remote computer using a PowerShell script. I'm new to PowerShell and I've just been googling how to do things, but I can't find out how to remotely open a word document on another computer using…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-07T21:05:57.55+00:00
Jameson Fawcettt 0 Reputation points
commented 2023-02-09T13:15:36.46+00:00
MotoX80 32,246 Reputation points
1 answer

How can I use PowerShell Script to extract all engagement and assignment completion data from Class Teams?

Hi there, I would like to extract all engagement and assignment completion data from across all of our class teams in order to delve into this data and incorporate it into our data models on our pupils. Is this possible through PowerShell? If so, i would…

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,243 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-08T12:14:02.4266667+00:00
Darren Bastyan 20 Reputation points
answered 2023-02-09T11:59:27.4266667+00:00
Darren Bastyan 20 Reputation points
2 answers

How to use Show-DnsServerCache -CacheScope parameter

i don't know how to use -CacheScope in Show-DnsServerCache command

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,158 questions
asked 2023-02-08T03:04:25.7533333+00:00
junjie wu 5 Reputation points
answered 2023-02-09T09:15:20.2033333+00:00
Limitless Technology 44,001 Reputation points