3000xtra
adobe
adsi
adsi management
alias
arguments
automation
bcp
bloomberg
bootable usb
bulk copy program
cacls
check patch
citrix
citrix dazzle
citrix mfcom
citrix printing errors
citrix xenapp
citrix xenapp 5.0
cmdlet reference
color
command
command-line
directx
disk information
domain groups
domain membership
driver
drivers
enumerate
error handling
event id 26
event log
example
export
flex
how to
ica
icon
import
install printer
jet
mfcom
microsoft virtual pc
powershell
printer
printers
reciever
reuters
server 2008
sign
sql
stick figure
summary database
terminal server
terminal services
vbscript
Windows 7
wmi
xenapp
Power Shell Reading Text Files |
Reading text files is pretty straightforward with Get-Content:
PS C:\> get-content boot.ini
[boot loader]
timeout=15
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP
Professional"
/fastdetect /NoExecute=OptIn
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003,
Enterprise" /
noexecute=optout /fastdetect
C:\CMDCONS\BOOTSECT.DAT="Microsoft Windows Recovery Console" /cmdcons
PS C:\
Code = 80040e4dPS C:\> In this example, the first five lines of a log file are displayed. You can get the same result with this expression: PS C:\> get-content ADOXEXCEPTION.LOG |select-object -first 5 An advantage to this approach is that Select-Object also has a -Last parameter that you can use to display a specified number of lines from the end of the file.
Code meaning = IDispatch error #3149
Source = Microsoft OLE DB Provider for SQL Server
Description = Login failed for user 'scriptaccess'.


