All Questions
Tagged with powershell powershell-4.0
1,654
questions
0
votes
0
answers
14
views
Changing User Rights Assingments From A Powershell Script [duplicate]
I am currently working on a project to make a script to get any computer CIS compliant up to IG3 level. Part of this includes changing the User Rights Assignments to only Admins or remote desktop ...
1
vote
1
answer
101
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
0
answers
31
views
Powershell - Set-VpnConnectionIPsecConfiguration : Invalid namespace
The default Windows built in L2TP client uses 3DES, and for VPN connection I need to use AES to AES256, so I found command to use Powershell to edit a connection:
Set-VpnConnectionIPsecConfiguration -...
0
votes
1
answer
47
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
62
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
...
0
votes
1
answer
49
views
Event View Source Not Found When Creating an Event with Powershell
Trying to create simple events with ID's greater than 1000 to test a notification system using powershell.
Write-EventLog –LogName System –Source FailoverClustering –EntryType Error –EventID 1793 –...
0
votes
1
answer
72
views
add string as a prefix to extracted string (PowerShell)
I have a script that extract set of sha256 hash from csv and save it in txt file,
I want to add string (as a prefix) before each sha256 hash
the script:
$csvfileImport = "C:\test.csv"
$...
0
votes
1
answer
69
views
Powershell Excel Autofilter RGB Colors
I'm currently trying to enter RGB colors in the Excel Autofiter. Does anyone know how this works in Powershell?
$WorkSheet1.Range("A6:AW6").AutoFilter(1,$WorkSheet1.color.rgb(0,255,0), 8)
...
2
votes
2
answers
72
views
Powershell Custom Sorting
I have below content in a txt file which will be read by powershell and should be rearranged based on a custom condition
File: abc.txt
General
User1/Alert
User1/LogicApp
General/Abc
User2/Alert
User2/...
0
votes
1
answer
229
views
PowerShell script Error Directory Name is invalid
I am trying to invoke a power shell script using task scheduler but it gives me the error, The directory name is invalid Error (0x8007010B).
I have tried placing the script in C: and C:\users and also ...
-1
votes
2
answers
158
views
PowerShell script to export Array in CSV format with Headers
I've below PS Script which connects to API and puts responses on an Array List.
I'm struggling to convert Array List to CSV file and giving them a Column Header.
Anyone got Idea how to this can be ...
1
vote
1
answer
52
views
POWERSHELL jump Back in EXCEL COM-Object
I have a function to open a Excel sheet and one to manipulat differend cells in a excel sheet.
Now I'd like to save and close the the Excel-data.
But I pass only the Sheet object. How can I jump "...
0
votes
0
answers
235
views
Powershell script to download files from a Google Drive
I need a Powershell script that can download a file from a Google Drive and then delete it. I cannot find any examples of this being done in Powershell though. The piece that I am struggling with is ...
0
votes
1
answer
81
views
Powershell Removing rows from a CSV that matches values in a Separate CSV
We are currently in the process of migrating files and at the end of each migration we need to produce a report of any file that doesn't get migrated. (Not all source files are migrated).
I produce a ...
0
votes
1
answer
47
views
Fetch all the files in a folder but exclude all the files in a sub folder by using powershell
I have a powershell script to fetch all the files in a folder but exclude all the files in a sub folder. I am using the following script, but not giving the expected results.
Get-ChildItem -Path $...