1,963 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-1
votes
2
answers
88
views
Optimizing ps1 Script that deletes files/folders [closed]
I have here code that recusively deletes all files/folder older than 7 days within a directory. The directory is fairly large last time I ran it took about 12 hours to finish. I know that getting ...
0
votes
1
answer
268
views
Install-ADDSDomain: Verification of prerequisites for Domain Controller promotion failed. The specified argument 'ConfirmGc' was not recognized
I am trying to install a new tree domain to my forest but I get the following error:
The target server will be configured as a domain controller and restarted when this operation is complete.
Do you ...
3
votes
0
answers
74
views
Getting exception while exporting Certificate Key PEM file using Power Shell
Trying to export the Certificate Key PEM file using Power Shell but getting the exception - Exception calling "GetRSAPrivateKey" with "1" argument(s): "Key not valid for use ...
0
votes
0
answers
44
views
API returning response as 3 instead of json when we copy request from "copy as powershell" option
when i tried to copy request objects from chrome browser by "Copy as PowerShell" option , and try to paste that into PowerShell in my machine.
i am getting content in response as 3 ,instead ...
0
votes
0
answers
75
views
Unable to understand RPC_E_SERVERFAULT Error
I have a PowerShell Script that cycles through multiple Excel Workbooks, runs a few VBA routines, and then closes.
Unfortunately, I get the following error :
Exception calling "Run" with &...
3
votes
1
answer
119
views
Constructor invocation syntax in PowerShell 4.0 and lower without using New-Object
I ran across some older code today that piqued my curiosity. I'm aware of 2x different syntactical ways of instantiating .NET objects in PowerShell 4.0
# Using New-Object to pass multiple args to the ...
1
vote
3
answers
88
views
How to add single quotes to one of the columns in PowerShell?
I have the following lines in a file:
pc_cc_text$fx_review1 CONSTANT VARCHAR2(100) := 'For Company Review'; -- AD_PRT_AUTH_(MSP)
pc_cc_text$fx_review2 CONSTANT VARCHAR2(100) := 'For Dept Review'; -- ...
0
votes
1
answer
1k
views
How to get Drive Item ID of a file from a user OneDrive using PowerShell Microsoft Graph
I'm trying to get a specific file's Drive Item ID from a user's OneDrive using Microsoft Graph. The sample script below is working, but it's really slow because it has to search the entire user's ...
0
votes
1
answer
63
views
How to delete all lines AFTER and INCLUDING a certain string?
I have a need to delete all lines in a csv AFTER and INCLUDING a certain string. The string is as follows :
S_Channel_Alt_View
The file should then look like this
I've tried to set something up ...
0
votes
1
answer
111
views
I need a script for SCCM detection key to Match Value Data
/* I need a script SCCM detection key for match "Value Data" in "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" Without using "ValueName" Match "...
0
votes
2
answers
212
views
How to append the data into HTML file or HTML table using PowerShell
I am working on a health check PowerShell script that is generating an HTML file. Now, I want to update the solution where If I run the same script again (as a post check) it should create maybe ...
0
votes
0
answers
164
views
Certificate is not accessible to the current user
Receiving the above error while connecting to exchange online through system center orchestrator runbook workflow. The path given was verified and correct. The script works completely fine when we run ...
1
vote
1
answer
523
views
How to loop through all video files (kind:video) regardless of what extension those files(could be .mkv / .mp4 / .mov etc.) have?
So I know that by using this command we can loop through all the MKV / MP4 files in the current folder. But I don't want to have to Google and find out what all possible file-types or extensions the ...
0
votes
1
answer
66
views
trying to write a PowerShell script to look for certain strings in a text file
I am trying to write a PowerShell script to look for certain strings in a text file but not getting very far.,
What I want to do is:
Search line by line until "set name 'Web Traffic Filter - ...
0
votes
1
answer
151
views
When Converting excel to csv for empty cells quotes not coming
I'm trying to import excel file to csv format through power shell using this command
import-excel c:\users\xxxx\TestFile.xlsx | export-csv c:\users\xxx\CSVFile.csv -NoTypeInformation -Encoding UTF8
...