Powershell GUID Generator

I’ve built a simple GUID generator that generates GUID and puts it into the clipboard!

You can download the file from my repository: guid.ps1

You can read more info at the Git Hub Page

Details

In PowerShell you can generate GUIDby typing …


This content originally appeared on DEV Community and was authored by Senad Meškin

I've built a simple GUID generator that generates GUID and puts it into the clipboard!

You can download the file from my repository: guid.ps1

You can read more info at the Git Hub Page

Details

In PowerShell you can generate GUIDby typing [Guid]::NewGuid() into your PS terminal, but then you would need to copy it from the terminal and paste it where you need it. It was complex for me so I've built a script that does all the for you.

$guid = [guid]::NewGuid().ToString();

Set-Clipboard -Value $guid;

Write-Host 'Guid:' $guid 'copied to the clipboard!';

In use

E:\ps> guid
Guid: d5bae5bc-d0dc-47ef-bbf7-1323f7a2180e copied to the clipboard!
E:\ps>

NOTE: Just be sure to put the guid.ps1 file somewhere where your path is defined so you can access it from anywhere.


This content originally appeared on DEV Community and was authored by Senad Meškin


Print Share Comment Cite Upload Translate Updates
APA

Senad Meškin | Sciencx (2022-05-10T19:56:18+00:00) Powershell GUID Generator. Retrieved from https://www.scien.cx/2022/05/10/powershell-guid-generator/

MLA
" » Powershell GUID Generator." Senad Meškin | Sciencx - Tuesday May 10, 2022, https://www.scien.cx/2022/05/10/powershell-guid-generator/
HARVARD
Senad Meškin | Sciencx Tuesday May 10, 2022 » Powershell GUID Generator., viewed ,<https://www.scien.cx/2022/05/10/powershell-guid-generator/>
VANCOUVER
Senad Meškin | Sciencx - » Powershell GUID Generator. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/05/10/powershell-guid-generator/
CHICAGO
" » Powershell GUID Generator." Senad Meškin | Sciencx - Accessed . https://www.scien.cx/2022/05/10/powershell-guid-generator/
IEEE
" » Powershell GUID Generator." Senad Meškin | Sciencx [Online]. Available: https://www.scien.cx/2022/05/10/powershell-guid-generator/. [Accessed: ]
rf:citation
» Powershell GUID Generator | Senad Meškin | Sciencx | https://www.scien.cx/2022/05/10/powershell-guid-generator/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.