Skip to content

nicktanix/PowerShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PowerShell

Script #1 New-PSSMenuItem

This script adds a PowerShell Script option to the New Context Menu Iterm in Windows Explorer by making a simple registry change using the New-Item and New-ItemProperty CMDLET.

Adds a PS-Drive that is mapped to {HKCR}:HKEY+CLASSES_ROOT using the new. It was neccesary to run the New-Item CMDLET which creates the Registry Key "ShellNew" by NOTing it against it alreadying existing to avoid an error. We check for the Key by using the Test-Path CMDLET referencing the HKCR PSDrive we already defined. From there we can call the propper CMDLETS in either code block of the IF or ELSE statements.

ScreenShot

REFERENCES: New-Item New-ItemProperty Test-Path New-PSDrive

About

Awesome Powershell Scripts

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors