Siemens Industry Online Support
Siemens AG
Tipo di articolo: FAQ, ID articolo: 109483101, Data articolo: 05/10/2016

How do you determine the SHA-256 or SHA-512 checksum of a file?

  • Articolo
  • Riguarda prodotto/i
To check the integrity of a file you can use mathematical procedures to create a hash value (checksum) of the file.

In the Siemens Industry Online Support we specify the SHA256 or SHA512 hash value for executable download files. With these you can check whether the file has been downloaded unchanged.
For this you have to calculate the hash value of the downloaded file and compare it with the value specified on the download side.
A hash value is shown in hexadecimal format, which means that spaces and the case of the letters are not relevant and serve only for legibility.

You can find, download and use any program in the internet for calculating an SHA256 or SHA512 hash value.
But Windows (version 7 SP1 and higher) also provides the possibility of determining the hash value; for this you need the Windows Powershell V4.0 or higher (see Notes).


To have the SHA256 hash value of a file calculated you enter the following command in the input prompt:   powershell get-filehash -algorithm sha256 'filename'


Fig. 1

In order to make it easier to calculate the hash value you can download the following batch file. You then drag-and-drop the file to be checked to this batch file (or to a link). The hash value is then displayed in the Windows editor:

 Registration required  109483101_Hash_FileToTxt.zip (1 KB)
SHA256: C724B40B61DDA1B8E43D8787D3BE7C77B81FFB9E4CBF6FC4CB1CCF13E736D466


With the command powershell get-filehash -algorithm sha512  'filename'  you can have a SHA512 hash values calculated, but they are then not displayed completely.
Alternatively you can use the following command:  CertUtil -hashfile "filename" SHA512


Fig. 2


Setting the window size for the input prompt
In the default settings the width of the input prompt is often too narrow (80 characters) so that the SHA256 hash value or the file name might be truncated with three periods. You then have to change the settings once:

  • Press the key combination <Win><R> to open the "Run" dialog and there you enter CMD .

  • Click the "C:\" icon in the title bar of the CMD window and select the properties >Layout>Width. There you enter a new width of about 160 and click OK.

  • Close the CMD window by entering EXIT and pressing Enter.

Fig. 3

Determining the installed Powershell version
Press the key combination <Win><R> and enter Powershell. Enter $PSVersionTable :

Fig. 4

Under "PSVersion" you can read the version of the Powershell.
You need at least version V4.0 for calculating the SHA256 hash value.

Updating the Powershell
The Powershell is included in the Windows Management Framework (WMF) which you can download directly from Microsoft.
For this you search for "download wmf" on the international Microsoft website.
Version 5.1 is available on this page: https://msdn.microsoft.com/en-us/powershell/wmf/5.1/install-configure. 

Additional Keywords

Avvertenze di sicurezza
Al fine di proteggere impianti, sistemi, macchine e reti da minacce cibernetiche, è necessario implementare – e mantenere continuamente – un concetto di Industrial Security globale e all’avanguardia. I prodotti e le soluzioni Siemens costituiscono soltanto una componente imprescindibile di questo concetto. Ulteriori informazioni inerenti Industrial Security sono disponibili al sito
Sostegno per la statistica
Con questa funzione gli ID del risultato di ricerca saranno visualizzati secondo il numero desiderato (formato .txt)

Generare elenco
Copiare URL
Visualizzzare questa pagina nel nuovo design
Cockpit mySupport