Search This Blog

Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Tuesday, October 4, 2016

HOWTO list local administrators on the Windows commandline

net localgroup administrators

Monday, February 8, 2016

Some Useful powershell scripts


Power shell scripts:

#1 Read file names from csv file using pipe delimiter and copy files to with new name to new destination

C:\Temp\finals.csv - csv file
FileName - source file
NewFileName - new name and destination for file

$csv = Import-Csv L:\DataMigration\CalRad\Reports_finals.csv '|' -Header FileName,NewFileName
foreach ($line in $csv) {    If ((Test-Path $line.FileName)){ Copy-Item -path $line.FileName -Destination $line.NewFileName } }



#2  Get all of the pdf full file paths
      execute application using full file path as a command argument.


  $items = Get-ChildItem "L:\DataMigration\CalRad\LegacyData\LegacyReports\Scanned_Docs" -Filter *.pdf 
  foreach ($item in $items) { L:\DataMigration\CalRad\PDFToImage\PDFToImages.exe $item.FullName 140}


#3) import csv file pipe delimited with 4 columns
      copy file to new location using 3rd parameter as source location and 4th parameters as destination path and file name.


$csv = Import-Csv L:\DataMigration\CalRad\LegacyData\LegacyReports\Scanned_Docs.csv '|' -Header Accession,Type,FileName,NewFileName
   foreach ($line in $csv) {    If ((Test-Path $line.FileName)){ Copy-Item -path $line.FileName -Destination $line.NewFileName } }

Wednesday, March 27, 2013

Find open ports in Windows


From http://www.techrepublic.com


Microsoft Windows XP
Microsoft Windows also offers anetstatcommand that can be executed from the command line to get a list of open ports. The standard MS Windows version ofnetstatis slightly more limited than its Unix-like system counterparts, but still suffices to get a listing of listening services:
  netstat -a | find "LISTENING"
The output of this command should look something like this:
TCP    hostname:epmap           hostname:0               LISTENING
TCP    hostname:microsoft-ds    hostname:0               LISTENING
TCP    hostname:10110           hostname:0               LISTENING
TCP    hostname:netbios-ssn     hostname:0               LISTENING
. . . with “hostname” replaced by the system’s hostname, of course.

Wednesday, June 29, 2011

Remote Desktop Keystrokes

Remote Desktop Keystrokes

I am not even going to pretend to memorize these:

Ctrl+Alt+End = Ctrl+Alt+Del (the only truly required one to know!)

ALT+PAGE UP (Switch between programs from left to right)
ALT+PAGE DOWN (Switch between programs from right to left)
ALT+INSERT (Cycle through the programs in most recently used order)
ALT+HOME (Display the Start menu)
CTRL+ALT+BREAK (Switch the client computer between a window and a full screen)
ALT+DELETE (Display the Windows menu)
CTRL+ALT+Minus sign (-) (Place a snapshot of the entire client window area on the Terminal server clipboard and provide the same functionality as pressing ALT+PRINT SCREEN on a local computer.)
CTRL+ALT+Plus sign (+) (Place a snapshot of the active window in the client on the Terminal server clipboard and provide the same functionality as pressing PRINT SCREEN on a local computer.)

Tuesday, May 10, 2011

Windows Password Reset Tool

http://pogostick.net/~pnh/ntpasswd/

  • This is a utility to reset the password of any user that has a valid (local) account on your Windows NT/2k/XP/Vista/Win7 etc system.
  • You do not need to know the old password to set a new one.
  • It works offline, that is, you have to shutdown your computer and boot off a floppydisk or CD or another system.
  • Will detect and offer to unlock locked or disabled out user accounts!
  • There is also a registry editor and other registry utilities that works under linux/unix, and can be used for other things than password editing.