Quantcast
Browsing latest articles
Browse All 20 View Live

less command

In reference to "less" program... Here's how to use the PowerShell Community Extension less command from TCC. First, you need PowerShell, and the PowerShell Community Extensions, installed on your...

View Article


Select-String with Context

I have a file, astronomy.txt, which is generated by doing; Code: lynx -dump -nolist "https://www.timeanddate.com/astronomy/canada/london" > c:\utils\astronomy.txt The goal is to extract the...

View Article


PowerShell Core 6.1 Roadmap

Details the future of the Open-Source version of PowerShell. https://blogs.msdn.microsoft.com/powershell/2018/01/24/powershell-core-6-1-roadmap/ Joe

View Article

All Those Years Ago

Demonstration of how to get date properties using PowerShell, based on the date x years ago, or x years from now. Code: @setlocal @echo off function AddYears=`%@pshell[$d = Get-Date; $d.AddYears(%1)]`...

View Article

Application type for a .DLL

When I use @EXETYPE on a .DLL, it returns 6, regardless if it is 32-bit or 64-bit; Code: c:\users\jlc\utils>echo %@exetype[ISO8601-x64.dll] 6 c:\users\jlc\utils>echo %@exetype[ISO8601.dll] 6 As...

View Article


Duration of a Media file

Code: @setlocal @echo off pshell /s "$theFolder = 'C:\Users\jlc\Videos'" pshell /s "$theFile = 'Lana Del Rey - Love.mp4'" pshell /s "$DurationColumn = 27" pshell /s "$oShell = New-Object -com...

View Article

Round Function

While TCC does not have a round function, the PSHELL command and/or function can be used to round a number; Code: echo %@pshell[[math]::Round(22/7)] 3 ..or... Code: pshell /s "$a=22/7" echo...

View Article

Image may be NSFW.
Clik here to view.

Using a 32-bit In-Process COM Server DLL from 64-bit TCC

I have found a method to use the 32-bit In-Process COM Server DLLs that I have created using Visual Basic 6.0 and Visual FoxPro 9.0 from 64-bit TCC via PSHELL. Using the Microsoft OLE/COM Object...

View Article


TCC and PowerShell shared environment

I discovered something by accident today. I am using; Code: c:\users\jlc\utils>ver TCC 24.02.46 x64 Windows 7 [Version 6.1.7601] In my Powershell profile,...

View Article


GET-History with PSHELL

I am using; Code: _x64: 1 _admin: 1 TCC 24.02.49 x64 Windows 10 [Version 10.0.18362.116] Using Get-History via PSHELL /S does not return anything. I have tried; Code: e:\utils>pshell /s...

View Article

NetCmdlets

Just read about these in a german computer magazine (c't): <https://www.nsoftware.com/powershell/netcmdlets/> Looks interesting.

View Article

Finding Files with Alternate Data Streams

This script shows how to use PowerShell to display only files with Alternate Data Streams; Code: get-ChildItem -recurse | % { get-item $_.FullName -stream * } | where stream -ne ':$Data' | select...

View Article

GetCommandLine via PSHELL

I was having problems using the Kernel32.dll GetCommandLine function via @WINAPI, so I developed an alternate method using PowerShell. Here is the .BTM; Code: @setlocal @echo off type <<- endtext...

View Article


Find text in a data stream

Further to the thread FFIND TPIPE here is a method to search for text in a data stream using PowerShell via PSHELL. Code: e:\utils>pshell /s "get-content -path test -stream 'look' | select-string...

View Article

The History of your PowerShell

I was not aware that PowerShell saves everything you have ever typed at the PowerShell console; Code: notepad (Get-PSReadLineOption).HistorySavePath I viewed the file, and discovered everything that I...

View Article


Using PSHELL from TCSTART.BTM

Code: _x64: 1 _admin: 1 _elevated: 1 TCC 25.00.20 x64 Windows 10 [Version 10.0.18362.356] OS Name: Microsoft Windows 10 Pro OS Version: 10.0.18362 N/A Build 18362 I have in my TCSTART.BTM; Code:...

View Article

Platform Invoke of TakeCmd.dll

I have the following function defined in my PowerShell profile; Code: function tcc { & "c:\program files\jpsoft\tcmd25\tcc.exe" /I /Q /C $args } This allows me to call Take Command internal...

View Article


Adding up columns of a comma separated file (CSV)

Here is my method of adding up columns of a comma separated file (CSV) The .csv file consists of four columns; Code: Account,Trans_Date,Interest,Deposit While the goal is to sum the Interest and...

View Article

Use PowerShell automation dlls for commands/scripts without PowerShell

I came across this GitHub repository called PowerShdll It allows you to run PowerShell scripts or commands without access to PowerShell. It does this by using PowerShell automation dlls. As this...

View Article

Run a .PS1 file without PowerShell

I came across this article about how to use PowerShell without using PowerShell. Below is code to run a PowerShell .ps1 file without using PowerShell. I use CS-Script to run my C# code, but with a few...

View Article
Browsing latest articles
Browse All 20 View Live