Category Archives: Commands

Windows 10 – whoami command .

The whoami is used to display the domain and user name of the person who is currently logged on to this computer.
If used without parameters, whoami displays the current domain and user name.
You can use this command with the next parameters:

/upn Displays the user name in user principal name (UPN) format.
/fqdn Displays the user name in fully qualified domain name (FQDN) format.
/logonid Displays the logon ID of the current user.
/user Displays the current domain and user name and the security identifier (SID).
/groups Displays the user groups to which the current user belongs.
/priv Displays the security privileges of the current user.
/fo <Format> Specifies the output format. Valid values include:

table   Displays output in a table. This is the default value.

list   Displays output in a list.

csv   Displays output in comma-separated value (CSV) format.

/all Displays all information in the current access token, including the current user name, security identifiers (SID), privileges, and groups that the current user belongs to.
/nh Specifies that the column header should not be displayed in the output. This is valid only for table and CSV formats.
/? Displays help at the command prompt.

Some examples with this command:

  • check if we are running elevated : whoami /groups | find “-” ;
  • display all of the information in the current access token: whoami /all ;
  • see what security groups you belong to: whoami /groups ;
Posted in All, Commands, Windows 10. Tagged with , , , , .

Windows 10 – getmac command .

This is a simple command to get all your mac from your Windows system.
We can run it to retrieve the mac addresses of a remote computer.

Export a verbose listing of MAC addresses to a CSV file

See the help of this command:

Posted in All, Commands, Windows 10. Tagged with , , , , .

Windows 10 – sc command .

The sc command help us to retrieves and sets control information about services.

Some options of this command:

Let’s test query with intelhaxm:

To create a list of all services used:

You can use : start and stop to start and stop services.
The start option come with has one of the values auto, demand. or disabled.
Using administrator command shell you can see the RPC Services:

Posted in All, Commands, Windows 10. Tagged with , , , , .

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

Today I will show you more about C# and the subject of this tutorial is: threads.
First you need to start a project into your folder. Let’s see my example:

You can use notepad or any editor to edit the Program.cs:

About the thread issue then you need to know is a very complex subject.
My example will show you how the thread works.
First you need to start the thread and then deal with the thread.
Two methods is used: Start and Join.
Start begins executing at the first line of the method and does not block the calling thread.
Join is a synchronization method that blocks the calling thread (that is, the thread that calls the method) until the thread whose Join method is called has completed.
I used three threads and this threads just start count first 5 sec , next 8 sec and the last is set to 10 sec.
Let’s see the example:

Each thread will write to the output and then will see the time used.
See the output of dotnet run command:

Posted in All, C#, Commands, Programming, Windows 10. Tagged with , , , , , , , .

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

First you need to take a look at Microsoft DotNET – Core website..
This website will be the start for any .NET and C# issue on any operating system Linux, Windows, Mac or Docker.
I used for this tutorial Windows OS and for Fedora distro you can take a look here.
First you need to

The result of Hello World! show us the console application works well.
This will run this program:

You can change the text Hello World or test something else.
If you got errors the you need to fix it with :

Posted in All, C#, Commands, Programming, Windows 10. Tagged with , , , , , , , .