This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | using System; | |
| using System.Diagnostics; | |
| using System.Runtime.ConstrainedExecution; | |
| using System.Runtime.InteropServices; | |
| using System.Security; | |
| using System.Text; | |
| namespace ch1_hello_world | |
| { | |
| public class BasicInject | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function Enable-TSDuplicateToken { | |
| <# | |
| .SYNOPSIS | |
| Duplicates the Access token of lsass and sets it in the current process thread. | |
| .DESCRIPTION | |
| The Enable-TSDuplicateToken CmdLet duplicates the Access token of lsass and sets it in the current process thread. | |
| The CmdLet must be run with elevated permissions. | |
| .EXAMPLE |