SyntaxError: invalid syntax (try)

Im writing a script to start all of my services like Admin and Managed Server using Python. When i tried executing the same it shows the error try: ^ SyntaxError: invalid syntax Verified sy

View details »

Shell Context Menu - Shortcut to folder

Is it possible to create a Windows context menu which jumps to a folder (changing the current shell's working directory).

View details »

Is calling QueryInterface() ever absolutely necessary in COM?

In this C++/COM shell extension tutorial, the programmer demonstrates (for purposes of edification) that you can forego calling QueryInterface() and just pass around a general object instead. At le

View details »

Replace certificates

I have some expired certificates in etc/ssl/certs and I have a folder with new certificates. Is it possible to create a loop to check every certificate in certs folder and if the certificate is exp

View details »

PowerShell - Passing ParameterSet values to other ParameterSet causes AmbiguousParameterSet exception

I am trying to call a PowerShell function that has a parameter set, using another PowerShell function with a parameter set. In the code below, I want to call Entry-Point using either the -ABC or -DE

View details »

Search for keywords from csv and display results

in the CSV Include the softname column I need to search for a keyword containing 7-zip (or cmm) from it, if it is searched, display its version. $csvtxt = @' softname,version 7-Zip 18.05 (x64),18.

View details »

To check the file contents line by line

I need to check the contents line by line by selecting the string of the line. I have declared each line matching string to a variable.Is it possible to use switch cases for looking into the variabl

View details »

Shell script to call python program with changing arguments

I have images in a sub-folder. Let's the folder images I have a python program which will take image arguments from the folder one by one, the images are named in sequential order (1.jpg , 2.jpg, 3

View details »

Where-Object select-Object foreach-object Differences and usage

Where-Object select-Object foreach-object I am a powershell beginner. I don't understand too much. Can someone give examples to illustrate the differences and usage scenarios between them?

View details »

Removing all text between two sets of characters

I have a text file that contains hundreds of these lines. I'd like to remove each line that is wrapped in /* */. Here's a sample: /* Class = "UIButton"; normalTitle = "GET SUPPORT"; ObjectID = "2SP

View details »

Partial DSC configuration for SMB

Unfortunately i can't find any examples on the internet for my scenario. I got a DSC server with a SMB sahre. I want to deploy partial configs like in https://docs.microsoft.com/de-de/powershell/ds

View details »

get curves from polylines to create a detail line

Iam tring to create a script that can create detail lines from the selection thought the lines are as big as around 5' each the script say the following error "Exception : Autodesk.Revit.Exceptio

View details »

adb shell setprop log.tag.SOMETAG VERBOSE, how to get SOMETAG?

When I watch android source code, I found adb shell setprop log.tag.CAM2PORT_ VERBOSE This can output log in logcat. I want to know how to make all log tag output even if it is verbose. I have

View details »

Run powershell script from terminal

I know Ive done this before a few weeks ago but for some reason I dont think Im doing it right. To execute a script in a file, I should be able to type ./FileName.ps1 at the prompt, but this isn't

View details »

Why does a bash file prepend a path to a filepath in a command?

Scenario I have written the following bash script named wslLauncher.sh that contains: wsl java -jar "/mnt/e/someProjectFolder/JavaServerSort.jar" When I run this exact command from for example c

View details »

Script to disable RDP

I'm trying to disable RDP using powershell. I've tried the following code, but the values on the machine name I'm listing aren't changing. $file = Get-Content c:\PSscripts\regchange\computers.txt

View details »

How to open a new terminal and run two linux commands?

I have create a .sh script, with option to open terminal and that same terminal run 2 commands. I know to open a new window or tab and run a command but when I put && I receive error like this by u

View details »

How can I move items without hardcoded variables

I want to move items with the .txt extension but not like this, hard-coded. I want to select from a folder all files with some extension and move them into a folder with the same name as extension.

View details »

Handling Array in PowerShell Script

I wrote PowerShell script to automate some of the AD commands. Here is the script. $usergroup="TACACS Admins" $computerrole="1626-APPCONF" $zone="AWS" $username="<>" $password="<>"; [String[]

View details »

How to properly render nested hashtables in Powershell

I am trying to send a JSON api request via Powershell script, but nested hashtables (ie. anything more than one level deep) will only render as 'System.Collections.Hashtable' instead of the actual c

View details »