Tag 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 , , , , .

Blender 3D – sin mesh object with python.

This is a simple example of create one object from vertrices and edges using sin function.
First you need to create the mesh with: bpy.data.meshes.new .
The n number is random, you can use any number for vertices and edges.
This number is points for the drawing sin function.
The spaces variable is the range from this points.
Using for statements we can draw the sin function.
The last step is to add all of this into one object named sin.
This object will be link to the scene.
See the source code of this tutorial:

Posted in 3D, All, Blender 3D, Programming, Python. 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 , , , , , , , .