Results for powershell
I want to understand how to compile and link dynamic link-libraries work on Windows. I'd typically use CMake for this type of task, but I want to unde...
I know that I can use: Get-ChildItem *.txt | ForEach-Object { (get-Content $) | Where-Object {(1) -notcontains $.ReadCount } | Set-Content -path $_ } ...
Is it possible to validate pattern before creating RegEx object in PowerShell? $Pattern = "[A-Z]{1,3" # Pattern is invalid $Regex = [regex]::new($Patt...
If I am using a PowerShell ForEach-Object statement, and storing contents in a variable, is it possible to dump those contents to a log file every 100...
Scenario: I have a form with TEXTBOXA, TEXTBOXB and a BUTTON. BUTTON will add all the groups entered in TEXTBOXB to TEXTBOXA which is working properly...
I'm trying to extract the Compression attribute from several thousand jpeg files. How can I do this with either Excel VBA or PowerShell (or some othe...
Currently, I have a number of *.ps1 Cmdlet files, each providing a different function, e.g.: Encode-File.ps1 Decode-File.ps1 Now, I want to convert ...
I am preparing for an audit and trying to get our data via PowerShell, which I am a noob to. I am using the Search-ADAccount command to list our Expir...
I'm trying to recursively go through on all folders, looking for a specific sub folder (can be on multiple location), then list it's content (all file...
In PowerShell, child nodes and attributes of XML elements are accessible as properties: ([xml]"").Book.genre novel It is a Property, not a NotePropert...
Just of curiosity: When I - in my Powershell scripts - want to install or update a module or execute another command demanding elevated privileges, I ...
What is the easiest way to do integer division in PowerShell? So that the arguments are integers and the result is also an integer. In C++ it would be...
I almost have this but getting an error when inputting multiple computer names through the prompt input separated by comma. Individual computer name w...
I made a script to decline superseded updates automatically. I made a loop to find the superseding updates for each superseded updates, and the script...
Both python and powershell support a form of splatting array and named arguments as function inputs, a very useful feature. However powershell seem to...
Heys guys, So I wrote a small script in powershell (very new to this). Haven’t touched anything in like 10 years but here it goes: The script is suppo...
Before we get going, YES, we MUST use Read-Host. I'm creating a script to "do something" but first the end user has to input the values necessary (dep...
I am working with a WPF Powershell project (learning and incorporating relatable tasks while doing it). I have two check boxes which toggle the extern...
Couldn't find powershell equivalent for the below commands in the Dotnet SDK installation page. I need to add these lines to the Powershell Profile fi...
I am trying to ascertain whether 2 application version strings are equal in PowerShell and am getting a confusing result: PS C:\> $version = wmic prod...
The script below has been running on ps 5 till now. However i must now run it on 7 due to specific file scripts changes Can any one help me how to cal...
Pressing F2 when editing a PowerShell file does nothing in VS Code. (for other languages like C#, Python rename refactor (F2) works fine) What I've tr...
I have a lot of automation in Powershell but am trying to branch off into Python. I have written some Python scripts and are executing them from PS, ...
The default output of script-terminating errors that appears in the integrated console of VSCode's PowerShell extension, is not very helpful for debug...
I have a file with content { "Names" : {"first" : "Chuck", "second" : "Norris"}, "Numbers" : {"one" : "1", "two" : "2"} } I can read/write and con...
How do I undo the most recent local commits in Git?
How can I remove a specific item from an array in JavaScript?
How do I delete a Git branch locally and remotely?
How can I find all files containing a specific text (string) on Linux?
How to find all files containing specific text (string) on Linux?
How do I revert a Git repository to a previous commit?
How do I create an HTML button that acts like a link?
How do I check out a remote Git branch?