Showing posts with label powershell. Show all posts
Showing posts with label powershell. Show all posts

Monday, October 16, 2023

Disabling critical battery action

 I have an old laptop with an almost dead battery, which I always use tethered to a power source, mostly as a media device connected to my TV. Occasionally, I need to move it, and if it's open, Windows realizes that the battery is very weak and decides to hibernate, as that's the default critical battery action. This can become very frustrating. The good news is that you can easily address this issue using Windows' powercfg command.

Tuesday, February 18, 2020

Download new chromium based edge via powershell

If you ever need to download the stable version of the chromium based Edge via powershell, you can use the following one liner:


# Stable
# Invoke-WebRequest -Uri "https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?ProductreleaseID=Edge&platform=Default&version=Edge&source=EdgeStablePage&Channel=Stable&language=en" -OutFile "EdgeSetup.exe"
# Dev
Invoke-WebRequest -Uri "https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?ProductreleaseID=Edge&platform=Default&version=Edge&source=EdgeStablePage&Channel=Dev&language=en" -OutFile "EdgeSetup.exe"

Thursday, April 5, 2018

Exchange view DSN mail contents from queue

We had some DSN mails queueing up on our Exchange server's outgoing queue with error 450 4.7.1 and i was trying to figure out what were those mails in the first place. The Subject in all those mails looked like spam and since the From Address was empty, it got me kinda worried and curius at the same time. Using Queue Viewer wasn't helpfull since I couldn't see the origin of the DSN message. I had to use Exchange Management Shell to find out more info.

In order to view the email contents so that you can check the body and find out more information about the cause/source of the DSN, you need to know the message Identity, suspend the message's from processing and then export it.

Friday, July 3, 2015

Homemade certificates for the web developers

Working with the web, you will definitely end up having to generate a trusted certificate at least for your localhost. In my case, I have been working with certificates a bit more and the need of a personal CA was obviously the best solution. Moreover, I wanted to modify Fiddler's CA name to avoid having the ugly "DO_NOT_TRUST_FiddlerRoot". This post describes how I automated the certificate generation process and also mitigated the Firefox's warning about the old SHA1 hashing.

Tuesday, November 20, 2012

ADFS export and import claim transformation rules

Moving to AD FS it is wise to prepare to lab to test the whole infrastructure and then move to the production. One of the most frustrating things you will have to do is the claim transformation rules that you will have to setup between all Claims Providers and the Relying parties. Fortunately instead of using the UI and adding the rules one by one, you can setup only one and the export and import the claims rules to the rest of the parties.