2,082 questions with PowerShell-related tags

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

Script to list files on a remote Server

Hi All, So I'm runnung the below script to be able to retrieve the details of files on a Remote Server at the specified location. Clear-Host Set-Location $env:USERPROFILE Push-Location $env:USERPROFILE # # Set Output file…

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,381 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-02T16:08:48.7166667+00:00
SAMUEL VALAPARLA 126 Reputation points
commented 2024-04-30T08:17:35.1966667+00:00
SAMUEL VALAPARLA 126 Reputation points
0 answers

NVME disks serial number is abstracted in windows VM

Hi Team ,  I see that VMware is abstracting disk serial numbers for nvme disks and is presenting generic number like VMWare NVME_0000 for all the nvme disks mapped to windows VM via VMware. Is there any utility where we can get the actual disk numbers?…

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,548 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-30T04:28:41.4466667+00:00
Narayanareddy, Nandish 0 Reputation points
1 answer

How to set both Background and Lockscreen to slideshow using Powershell script only?

Want to deploy 3 images to use as slideshow for both Background and Lockscreen to a targeted group of user via Intune. The 3 images should rotate at a 1min interval as a Background and Lockscreen. Have tried to implement the scripts from various sites…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2023-11-01T05:56:04.0933333+00:00
ming 0 Reputation points
answered 2024-04-30T02:20:58.7766667+00:00
Topaz George 0 Reputation points
2 answers

Add multiple pictures Lockscreen slideshow for win 11 using psadt powershell scripting

Can anyone help me in creating psadt powershell scripting to add multiple pictures Lockscreen slideshow for win 11 and help me in deployment to intune. The Script should work to all the users which are assign using intune.

Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,367 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2023-07-07T06:40:36.8+00:00
Shravani K 20 Reputation points
answered 2024-04-30T02:19:00.6333333+00:00
Topaz George 0 Reputation points
2 answers One of the answers was accepted by the question author.

MS Office Installation using powershell

Does Microsoft Office support silent installation using powershell? if YES, i have use this powershell script to install MSOFFICE, but it won't works. can someone please fix this. $exePackageToInstall =…

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,318 questions
Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
2,010 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-10T05:39:05.5133333+00:00
Praveen siva 20 Reputation points
edited the question 2024-04-30T02:06:39.9766667+00:00
Emi Zhang-MSFT 22,011 Reputation points Microsoft Vendor
2 answers

Powershell learning resource recommendation

Just starting to learn Powershell and looking for advice and learning resources from experienced engineers; I would appreciate it if you could help me.

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2023-09-18T08:18:15.3233333+00:00
tj_zero 65 Reputation points
answered 2024-04-29T21:23:06.1066667+00:00
Plamen Peev 0 Reputation points
2 answers

How to run an interactive PowerShell command non-interactively?

How can I run a PowerShell command that is normally interactive non-interactively, i.e. supplying parameters directly in a PowerShell script instead of letting the user supply them? What I have in mind is something like "piping" in bash. I'm…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2023-02-03T11:45:03.7233333+00:00
Denis Rutten 40 Reputation points
answered 2024-04-29T20:12:53.4733333+00:00
Plamen Peev 0 Reputation points
1 answer One of the answers was accepted by the question author.

I need to return the copied data that Powershell output a long time ago.

1 Is it possible to view the copy history in Windows for all time? 2 Is it possible to view the results of all commands for all time in Windows PowerShell? If possible, how?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,667 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-16T06:58:11.1533333+00:00
Aleksandr 20 Reputation points
accepted 2024-04-29T19:29:47.86+00:00
Aleksandr 20 Reputation points
1 answer

Powershell from SSIS - Empty environment variable

I'm running a script in an SSIS package and I specify an account to run the package in SQL Server Agent. When it runs, I am unable to get the value of $ENV:LOCALAPPDATA Here's my code along with writing out the LOCALAPPDATA value Start-Transcript…

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,761 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,457 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-26T14:36:22.63+00:00
HSB 25 Reputation points
commented 2024-04-29T11:43:32.8766667+00:00
HSB 25 Reputation points
0 answers

Invoke-RestMethod: The remote server returned an error: (403) Forbidden.

Hello, I'm currently trying to retrieve a documentation page in Confluence to edit and save it with a PowerShell script. But I have a problem while recovering the data. Suggestions ? Thanks for your assistance !

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,381 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-29T10:01:47.4466667+00:00
Mathis MICHAUD 0 Reputation points
commented 2024-04-29T10:41:21.6766667+00:00
Olaf Helper 40,901 Reputation points
2 answers One of the answers was accepted by the question author.

Remove-MgGroupMemberDirectoryObjectByRef: Insufficient privileges to complete the operation

I am trying to use the Remove-MgGroupMemberDirectoryObjectByRef -GroupId $groupId -DirectoryObjectId $userId to remove users from a group. It works fine when using an account that has global admin permissions but using a service principal with…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,655 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-27T16:28:07.0666667+00:00
SMart-8804 20 Reputation points
commented 2024-04-29T10:10:54.6566667+00:00
SMart-8804 20 Reputation points
0 answers

Powershell 5.1.14393.4583 x86 do not support 'Add-SignerRule' command

The command runs with not problem on normal x64 powershell. But when I try to execute it from a x86 application, it does not working. Is it a known issue? And is there any workaround to make the x86 powershell work with 'Add-SignerRule'?

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-29T08:46:02.3166667+00:00
2 answers

Need some help to target the Group Policy to enable the NTLM audit?

I must audit any computers still using NTLM v1 in my AD Domain. Do I need to enable these group policies for all Windows servers and workstations in my AD Domain or just the Domain Controllers? Computer Configuration\Windows Settings\Security…

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,899 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,759 questions
Windows Server Security
Windows Server Security
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
1,729 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,381 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-18T12:53:32+00:00
EnterpriseArchitect 4,761 Reputation points
answered 2024-04-29T08:39:42.1833333+00:00
sumaiyaaisha 0 Reputation points
3 answers One of the answers was accepted by the question author.

Create a retention policy in Exchange Online using PowerShell

How can I use PowerShell to create a retention policy that deletes emails older than two weeks for a specific account in Exchange Online? I want to ensure that only the intended account is affected by the policy. Additionally, how can I verify that the…

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,192 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-09T08:24:49.0666667+00:00
Marcus Tagtstrom 20 Reputation points
accepted 2024-04-29T06:48:57.15+00:00
Marcus Tagtstrom 20 Reputation points
1 answer

"Time to display recovery option when needed" setting

Is there a possibility to check the "Time to display recovery option when needed" setting whether it is checked or unchecked using a Powershell script?

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-23T02:06:10.66+00:00
cy gabion 0 Reputation points
commented 2024-04-29T05:41:40.0633333+00:00
cy gabion 0 Reputation points
1 answer

Setting "Specify settings for optional component installation and component repair" through PowerShell

I am trying to set the value of this local policy to "Enabled" and as well "Download repair content and optional features directly from Windows Update instead of Windows Server Update Services WSUS". The target is to set these values…

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-18T14:55:42.09+00:00
John Ezzat 0 Reputation points
edited a comment 2024-04-29T02:10:09.5733333+00:00
Ian Xue (Shanghai Wicresoft Co., Ltd.) 29,971 Reputation points Microsoft Vendor
2 answers

Exporting sharepoint folders and sub-folders names + permissions

Hi team, I have a SharePoint site with a lot of folders, sub-folders, and sub-sub-sub-folders... Each folder has different accessibility. I would like to export a csv file with: Folder name Folder location Member names who have access (permission) to…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,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,082 questions
asked 2023-02-26T09:22:42.75+00:00
Tamir Giladi - Comoz Technologies 25 Reputation points
commented 2024-04-29T02:02:43.6066667+00:00
Min, Lei 0 Reputation points
1 answer

OU Delegation for different groups

Hello and thank you for your assistance in advanced. I have to delegate OU permissions to different groups of technicians. I have about 100 sites. Here's what each groups needs to do. Create, delete, move computer objects; create and delete OUs;…

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,899 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-04T19:05:11.3433333+00:00
Mario A. Hernandez 171 Reputation points
edited a comment 2024-04-29T02:02:06.64+00:00
Ian Xue (Shanghai Wicresoft Co., Ltd.) 29,971 Reputation points Microsoft Vendor
1 answer

Task scheduler scripts

Hi All i have 100 plus scripts running on a VM. i have task schedulers running daily, for few weekly. i want to export all the task scheduler scripts to a csv file. using the below syntax i am able to export $data = @() foreach ( $task in…

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,471 questions
Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,381 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,175 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,381 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-07T23:46:54.6566667+00:00
Glenn Maxwell 10,146 Reputation points
edited a comment 2024-04-29T02:01:47.19+00:00
Ian Xue (Shanghai Wicresoft Co., Ltd.) 29,971 Reputation points Microsoft Vendor
2 answers

Powershell script

Hi i want to create a script that runs every time a regular user logs in to one of your clients your domain writes a report with the name “yyyymmdd_computername.txt” and content “hh:mm:ss – username” to a central repository. Someone every time otherwise…

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,899 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,381 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,082 questions
asked 2024-04-12T13:18:55.0033333+00:00
Louai Al Obaidi 0 Reputation points
edited a comment 2024-04-29T01:58:36.3+00:00
Ian Xue (Shanghai Wicresoft Co., Ltd.) 29,971 Reputation points Microsoft Vendor