Powershell Tip #53: Run PowerShell as SYSTEM (NT AUTHORITY\SYSTEM)
Solution 1 : Interactive
Start-Process -FilePath cmd.exe -Verb Runas -ArgumentList ‘/k C:\SysinternalsSuite\PsExec.exe -i -s powershell.exe’
Found this answer to my question today:
AppData location when running under System user account
As it took far too much Googling to find this, if you need to access the AppData folder for the System account, go here:
I hit this because we needed to clear the NuGet package cache for a TeamCity build agent which was running as a service under the System account.
Note to self:
How to create a VHD(X) virtual drive, mount it as a drive in Windows, and enable BitLocker encryption on it…
Updating the Firmware on the LSI 9201-16i
I found this very helpful when flashing my two new LSI 9201-16e HBAs in my servers. After downloading the update package from here (9201-16e_Package_P20_IT_Firmware_BIOS_for_MSDOS_Windows), I shut down my Win10 VM, went into vCenter and made the LSI 9201 available for passthrough. I added a new PCI device to the Win10 VM, accepted the memory reservation notice, and started the VM up.
The key piece that I had missed when attempting this several days ago was running the command prompt as Administrator. Without this, I could not get sas2flash to even find the LSI adapter.
Then I gathered everything together from the update package:
To verify that sas2flash.exe could see the device, I ran:
sas2flash.exe -o -listall
And then to flash it:
sas2flash.exe -o -f 9201-16e.bin -b mptsas2.rom
And it worked! Then I ran the -listall command again to confirm the FW and BIOS versions were updated.
Hope this helps!
I kept having random freezes on my desktop running CentOS 6.7. I run a win7 guest, as well as Firefox on the host. On many occasions, the system would just hang for over 10 seconds at a time, with the only symptom that the CPU usage would spike for the duration. When it was happening regularly, I fired up top and saw that khugepaged was hitting 100%.
I found this page detailing how to disable khugepaged, and after going through the steps and rebooting the host, I have not seen the problem resurface yet!
How to use, monitor, and disable transparent hugepages in Red Hat Enterprise Linux 6?
Every once in a while, I’ll fire up my laptop and open Outlook 2010. My Today’s Mail search folder will show me messages from last week, or any date / range other than today. I’d not been able to figure out how to force Outlook to update the search folder’s index, until today:
How to troubleshoot Search Folders in Outlook 2010, Outlook 2007, and Outlook 2003
The relevant section that solved my problem this morning reads:
- To manually delete all Search Folders from the information store, click Start, click Run, type outlook.exe /cleanfinders in the Open box, and then press ENTER.
- After you use the /cleanfinders start up switch, your Search Folders will be deleted from the information store the next time that you start Outlook 2010, Outlook 2007, and Outlook 2003. However, the deleted Search Folders will still appear in Outlook 2010, Outlook 2007, and Outlook 2003 as inactive folders. If you want to continue using these Search Folders, click the Search Folder that you want to use. If you do not want to continue using one of the deleted Search Folders, right-click the Search Folder, and then click Delete.
I was a bit unsure of what would happen, as I thought it would possibly require me to recreate my search folders afterwards, but it does exactly as it says in the post. The command deletes the data from the information store, but leaves the search folders intact. Once this was completed, I just clicked on my Today’s Mail search folder, which was in light gray italics, and it updated to contain today’s mail! Amazing!
I found these helpful instructions on how to use Git (and likely many other services) through a SOCKS proxy, while being quite transparent to the calling service:
Proxy SSH Over SOCKS (the easy way)