New
#10
i got it
best regards
thank you for all your work
following work
get-winevent -FilterHashTable @{logname="Application"; id="1001"}| ?{$_.providername –match "wininit"} | fl timecreated, message | out-file c:\now\CHKDSKResults.txt
Out-File
The Out-File cmdlet sends output to a file. use this cmdlet instead of the redirection operator (>) when you need to use its parameters
PowerShell
PS C:\> Get-Process | Out-File -filepath C:\Test1\process.txt < does not work
Get-Process | Out-File -filepath C:\now\process.txt < works
This command sends a list of processes on the computer to the Process.txt file. If the file does not exist, Out-File creates it. Because the name of the FilePath parameter is optional, you can omit it and submit the equivalent command
Get-Process | Out-File C:\now\process.txt
Optional Parameters
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Get-Process | Out-File -WhatIf C:\now\process4.txt < works
Out-Printer
• The Out-Printer cmdlet sends output to the default printer
• following work
• Get-Process | Out-Printer
• Get-Content c:\now\950innow.txt | Out-Printer
• Get-Content 951copiedtorootthendeletedfromnow.txt | Out-Printer
• get-winevent -FilterHashTable @{logname="Application"; id="1001"}| ?{$_.providername –match "wininit"} | fl timecreated, message | out-printer
• get-winevent -FilterHashTable @{logname="Application"; id="1001"}| ?{$_.providername –match "wininit"} | fl timecreated, message | lp
• You can also refer to Out-Printer by its built-in alias, lp. For more information, see about_Aliases.
• The cmdlets that contain the Out verb (the Out cmdlets) do not format objects; they just render them and send them to the specified display destination. If you send an unformatted object to an Out cmdlet, the cmdlet sends it to a formatting cmdlet before rendering it.
• The Out cmdlets do not have parameters for names or file paths. To send data to an Out cmdlet, use a pipeline operator (|) to send the output of a Windows PowerShell command to the cmdlet. You can also store data in a variable and use the InputObject parameter to pass the data to the cmdlet. For more information, see the examples.
• Out-Printer sends data, but it does not emit any output objects. If you pipe the output of Out-Printer to Get-Member, Get-Member reports that no objects have been specified.
• Related Links Out-File Out-String
I just ran CHKDSK for the very first time on my desktop DELL PC, and am now attempting to view the results. Initially, CHKDSK appeared to be stuck at 10% completion. After about two hours, when I returned to the PC, I was shown the sign on screen. I assume that CHKDSK had completed. Is it normal for CHKDSK to return to the sign on screen upon its completion? I logged on to Windows Normal mode, as usual.
So I began going through following steps for Option One in this tutorial. I have Event Viewer opened, but there is nothing shown on the event sources line.
Should I redo CHKDSK?
VinceB.
Hello Vince,
If you ran CHKDSK on your Windows drive, then it would have scheduled a scan the next time you restart. When the scan finishes, it will finish restarting to the sign-in screen unless you have Windows set to automatically sign in to an account.
You should be able to click on the drop down menu arrow for "Event sources" at step 3 Option 1 to check those items.
OKay; will run CHKDSK again here. I need the practice anyway to embed the Option 1 procedure .
Hi Brink:
I must be doing something (simple) incorrectly. The screenshot shown above is what I am getting here. Still nothing within the Event sources line! I am not able to get the expected results in Step 3 of Option One. there is no effect when clicking on the dropdown arrow, and I am not able to type anything into the Event sources line.
What happens when you click on the arrow to the right of "Event sources" like in my first screenshot above?
Does the drop menu open?