Skip to main content

Posts

Showing posts from March, 2023

IIS SMTP Server Pickup Test

 Recently when deploying an IIS SMTP server, i needed to test with a simple email. Putting the below in a text document in the mail pickup folder under inetpub will perform a test and send the email out.  The to address can be anyone and the from address should be the domain you are trying to send from. If using a connector in M365 you can masquerade as any email address, If you are using authentication, you will need to set the From address as the account you are authenticating with  to: user@externaldomainname.com from: testuser@externaldomainname.com subject:This is a test. this is a test.

Powershell File Name Replace

 Posting this so i remember for the future. The below replaces "123456" with "abcdef" in filenames located in the current working directory.  Dir | Rename-Item -NewName { $_.Name -replace "123456 ","abcdef" }