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,194 questions
1 vote
0 answers
153 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
95 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
251 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
148 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
182 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
116 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
135 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
419 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 ...
1 vote
2 answers
231 views
Azure "Run Command Script" Invoke SQL on new SQL Server VM using "NT AUTHORITY\SYSTEM"
I deploy SQL Server 2022 Azure VM's on a regular basis. I want them to be pre-configured with a series of company standards (the details are not that important just know that this involves restoring ...
0 votes
1 answer
195 views
"Get-ADDomainController -Filter *" fails with "Directory Object Not Found"
This happens on our forest DCs, but not on our child domain DCs. From the forest DCs, I can run Get-ADDomainController -Filter * -Server , but I can't do it the other way around. From either domain, I ...
3 votes
1 answer
231 views
How to fix Powershell script when it says "mdf, ndf and ldf already exist"
I have a PowerShell script producing the error below: Set-DbatoolsInsecureConnection -SessionOnly Get-ChildItem "F:\WH_BEE\FULL\WH_BEE_FULL_$(Get-Date -Format "yyyyMMdd")_*.bak" | ...
0 votes
3 answers
292 views
Migrate Windows File server keeping NTFS and share permissions (not robocopy or xcopy)
I need to copy all files from an old file server to a new file server on the same local network and preserve all permissions associated with every file. I have done this operation once successfully. ...
0 votes
1 answer
57 views
How do I edit a remote file as administrator that swaps out a part of an existing string with a different partial string
I need to edit files on multiple systems that require RunAs administrator. I have been working on a script to ensure the command works. I can run the script. My original attempt would modify the ...
2 votes
1 answer
125 views
Weird Windows copy / paste issues - leading spaces
I'm working on a large-scale unstructured data project in my org, and there's a number of very large volumes which need to be relocated that have thousands of folders (which are named 0000000 - ...
0 votes
1 answer
431 views
Convert Windows ETL file to text logs
How do I convert an ETL trace to readable text that contains all the (fully-resolved) log strings within? e.g. I'm trying to get all logs from all Microsoft-Windows-Bluetooth-* providers. (The ETL ...