Regex to retrieve value from table

PowerShell
We have users replying on an e-mail and we need to retrieve the date mentioned in the table. For the moment I made the following code to do that for ...
3 years ago

SSH-Keygen "no such file or directory"

PowerShell
Trying to Generate a public key for my git. Using Powershell. PS>ssh-keygen -t rsa -b 4096 -C "my@emailaddress.com" Generating public/private rs...
3 years ago

Powershell pipelines null values to own function

PowerShell
Disclaimer: I started from zero with Powershell (okay, I had some .NET knowledge from C# and I used the Linux and Windows command lines before) only t...
3 years ago

Scriptpower

PowerShell
8 months ago

Putting CSV Data as is into a New CSV

PowerShell
I have a CSV file with two columns; Identitiy, and User. the User column contains UserPrincipalNames, and the Identity column contains a name. What I'...
3 years ago

GCE Windows Instance not running startup scripts

PowerShell
I have been trying to apply my startup scripts to new Windows instances on Google Compute Engine as described here, however when I check the instances...
2 years ago

Is there a shorthand for the IF statement in PowerShell?

PowerShell
In bash, I often did things like: [ -z "${someEnvVar}" ] && someEnvVar="default value" Instead of creating a full-fledge if statement: if ...
2 years ago

Zabbix script timeout

PowerShell
I'm trying to run powershell script for cleaning disk on agent from Zabbix. Seems that script is running too long and instead response I got error. p...
2 years ago

Creating a Powershell menu from from config file

PowerShell
I have been trying to build a menu from a config file in Powershell. The purpose of the menu is to call other scripts and executables and to make mai...
3 years ago

Recursive directory listing with 8.3 shortname notation

PowerShell
I have a PS command: PowerShell.exe "dir -Verbose -Recurse | Select-Object Mode, Length, Name, Directory | Export-Csv "listing.csv"" This works to ...
3 years ago

Error quoting and/or escaping, cmd running Powershell

PowerShell
I am missing something when I try to convert the following single line command into multiple lines. I searched, found, and tried to model this change ...
3 years ago

Sort and export-CSV

PowerShell
I have a csv file containing rows of the following extract: "EmployeeID","FirstName","LastName","Location","Department","TelephoneNo","Email" "0...
3 years ago

Setting playback device by executing a batch file / powershell script

PowerShell
I've got my computer(Windows 7) hooked up to the TV, and i very often change output device for sound between Digital Audio (S/PDIF)(High definition au...
3 years ago

How to find MAX RAM in powershell

PowerShell
How to find the maximum RAM a computer can be extended upto in powershell. I tried using $colItems3 = get-wmiobject -class "Win32_OperatingSystem" ...
2 years ago

How to add application to Azure AD programmatically?

PowerShell
I want to automate the creation of my application in Azure AD and get back the client id generated by Azure AD. Are there PowerShell commandlets to d...
2 years ago

Write output of a java program fired from Powershell to standard output

PowerShell
I have a powershell script that is calling a jar via the following code: Start-Process java -ArgumentList '-jar', "$jarPath", "$csvPath" However, t...
3 years ago

Creating log file in powershell

PowerShell
I have a powershell program that checks if the site is responding and retrieves data and put it inside a file using invoke-webrequest function. I want...
3 years ago

PowerShell foreach how to skip last element

PowerShell
I have the follow array with the elements $list = "A","B","C","1","2","3" using foreach I can view all items in the array. foreach ( $item in $...
3 years ago

In PowerShell, how do I convert DateTime to UNIX time?

PowerShell
In PowerShell, how can I convert string of DateTime to sum of seconds?
3 years ago

Sync-WDSite Web Application Physical Path Parameter

PowerShell
I've written a script which syncs sites between IIS Servers. All my website got synced without an error, but one site (which is of course the site whi...
3 years ago