Category : script

I have the following command in PowerShell, which I need to get SID $([System.Security.Principal.WindowsIdentity]::GetCurrent().User).Value The above command gives SID ending with XXXX5928 when I log in with Admin user But i am expecting SID ending with XXXX5706 as shown in the following registry My question is "Which command will give me SID ending with XXXX5706 ..

Read more

I’m doing a script that change the default browser to the Microsoft Edge and I have done this: function Set-DefaultBrowser { Add-Type -AssemblyName ‘System.Windows.Forms’ Start-Process $env:windirsystem32control.exe -LoadUserProfile -Wait -ArgumentList ‘/name Microsoft.DefaultPrograms /page pageDefaultProgrampageAdvancedSettings?pszAppName=MSEdgeHTM’ Sleep 10 [System.Windows.Forms.SendKeys]::SendWait("{TAB}{TAB}{TAB}{TAB}{TAB} {ENTER}{ENTER} ") } Set-DefaultBrowser But i don’t like that is like a person where doing it opening the menu ..

Read more