PowerShell tips – part 009.

Today I come with this simple tutorial about how to show logs from the last day.
The command is very simple and can be used with powershell and administrator command shell like this:

This command is build from Get-EventLog and parse by Get-Date, see options:

About AddDays is not only option you can use it.
You can get all of this options using this command:

C# – First steps with C# and .NET – part 003 .

This tutorial show you how to deal with a C# and forms using Visual Studio Community 2017.
You need to start your project with C# – Windows Form Apps (.NET Framework).
On this default form window project you can change title and some settings like size, colors .
After that , you need to add editbox and label for each area from country , city street and number to window form.
In my example I used text_country for the name of editbox and I let default label1 for the label. The text from label1 I changed to Country to see it on form.
Make this changes for each editbox and label.
You need to have one button named search map point and one webbrowser area to show the location on map.
Next, press on button and make the changes into source code to work with webbrowser area.
The source code is simple – see bellow sorce code and the application screenshot.
The application can be found here:

Using wevtutil command under Windows – part 002.

In this tutorial I make a script for clean all events.
The script is very simple and is just a run of wevtutil command and some printing messages.
Open your editor and save the script with the extensions bat or cmd.
Also you need to have Administrator rights to run the script.
The script run FOR ,IF and GOTO selections to run well with the admin.
First and second lines of code is for to run the batch file and throw up admin rights.
Lets see the source code.

Windows 10 – Can you delete the $WINDOWS.~BT folder ?

First the $WINDOWS.~BT folder are associated with the Windows 10 and Windows 8 upgrade process.
The advice is: Do not delete it.
The folder may using gigabytes of disk space.
If you really want to delete it then you can try to use Disk Cleanup tool.
This included with whatever version of Windows you’re using bu click right on C:\ then select Properties.
On Disk Cleanup tool and click Clean Up System Files.
Select this:

  • Previous Windows installation(s) on Windows 10;
  • Temporary Windows installation files on Windows 7 and 8;

Press the OK button to remove the files.
If don’t see one of this selection then don’t try to remove it.