Questions tagged [powershell]
An interactive shell, scripting and programming language, and surrounding environment from Microsoft. Commonly used by system administrators managing Microsoft software (including Windows, Exchange, SharePoint, and cloud services Azure and Office 365), PowerShell is included by default with Windows, and takes over from previous languages such as VB Script.
4,197 questions
0
votes
0
answers
132
views
Intune Win32 application installs fine and detection script returns DETECTED… but Company Portal says it’s not detected
I’m running into a strange issue with a Win32 app in Intune and I’m hoping someone has seen this before.
Scenario
Win32 app (packaged with IntuneWinAppUtil)
Install behavior: User App
Installs to:C:\...
0
votes
1
answer
83
views
Copy Scheduled Tasks to another server
The following script: (copied from copilot response):
Get-ScheduledTask | ForEach-Object {
$taskName = $_.TaskName
$taskPath = $_.TaskPath
$exportPath = "C:\Tasks\$($taskName).xml"
...
1
vote
1
answer
268
views
Robocopy to a network drive in task scheduler
I'm trying to robocopy to a network drive using powershell and call that from task scheduler on Windows Server 2022.
I can't get the network drive to be visible to powershell in task scheduler. The ...
0
votes
0
answers
42
views
Is there a way to get the list of VMs in a datastore in VMWare vSphere Client using REST?
I am trying to get the list of VMs under a datastore in my vSphere client using REST in PowerShell and i seem to get stuck between the two..
I can only see some basic info about each datastore I have ...
1
vote
0
answers
65
views
Assign Entra ID user Windows VM Role
I want an Entra ID group and the users in the group to be able to logon to assigned Entra ID joined machines and assign them a certain role (user, admin, ...).
The problem: the Entra ID joined ...
0
votes
0
answers
70
views
Windows MSU Patch Installation Fails at 94% Post-Restart with "Undoing Changes" – No Errors in CBS Logs (Tried DISM Extraction & Step-by-Step Install)
I'm encountering an issue installing a Windows MSU patch (e.g., KBXXXXXXX) using WUSA on Windows 10. The initial installation phase completes successfully, but after restarting, the post-install phase ...
1
vote
1
answer
221
views
How to enable shutdown PowerShell script on Windows 2022 without using GUI
I am provisioning Windows Server 2022 EC2 instances using Terraform and a PowerShell User Data script.
I want to add functionality where this User Data script will configure a shutdown PowerShell ...
1
vote
1
answer
230
views
Winrm cannot complete the operation from one server to another, but can connect to others
Not a duplicate of https://stackoverflow.com/questions/39917027/winrm-cannot-complete-the-operation-verify-that-the-specified-computer-name-is
Also, I posted question in StackOverflow here: but it ...
1
vote
0
answers
148
views
Get AD FS Relying Part Signature Certificate expiration within powershell
I'm working on automating some certificate rotation tasks. Specifically, we still have some applications using AD FS SAML authentication, and so I'm converting this to use powershell run by a ...
0
votes
2
answers
273
views
Handle csv file - add value with mapping table
A script generates a csv-file:
User | actualValue |
user01 | actualValueB |
user02 | actualValueC |
user03 | actualValueB |
user04 | actualValueA |
user05 | actualValueA |
.
.
.
The file has the ...
-1
votes
1
answer
305
views
How to find overlapping or conflicting GPOs
We have 600 GPOs.
I want to find policies that have the same or duplicate settings.
How can I do this?
Thank you.
1
vote
1
answer
238
views
DFSRDIAG backlog and Get-DFSRBacklog fail with access denied when run via PSSession
From an elevated Powershell session on either source or receiver, I can successfully run:
dfsrdiag backlog /smem:source /rmem:receiver /rgname:"Group" /rfname:"Folder"
However, ...
1
vote
1
answer
187
views
How can I uninstall/remove these services from some of the domain devices using automation?
I manage about 300 Windows devices in an Active Directory domain.
Some endpoints have unauthorized applications installed that are generating a high volume of tickets for our team and causing heavy ...
1
vote
1
answer
165
views
Users with privileged roles on administrative units
I need a list of Entra users in my tenant who can assign themselves privileged roles.
I need the RoleName, UserName, AssigmentType (for general, not if it's pimmed at the moment the script runs) and ...
0
votes
1
answer
569
views
Windows Admin Center fails to install with error: Failed to configure PowerShell Remoting. Error: Access is denied
I am attempting to migrate a local Windows server (2016) to a new local server (2022) using Windows Storage Migration Service. While installing Windows Admin Center ("WAC"), I encounter the ...