Outlook
8 TopicsAutomatically Triggering the Smartcard PIN Prompt in Outlook
I use Outlook to receive encrypted emails that are protected by a certificate stored on my smartcard. When opening these emails, a Windows Security prompt appears, asking me to enter the PIN for my smartcard to decrypt the message. Once the PIN is entered, I can access the email contents. I'm looking for a way to automatically trigger the PIN entry dialog via code so that the user is prompted to enter the PIN without manually clicking on the encrypted email. The user will still need to insert their smartcard and manually enter the PIN, but I want the dialog itself to be initiated programmatically. I would prefer to implement this solution in PowerShell, an Outlook macro (VBA), or Delphi. However, I encountered an issue: when attempting to display the email using MailItem.Display(True), the PIN dialog does not appear. Instead, the following error message is shown: "The name of your digital ID could not be found by the underlying security system." Has anyone experienced this or have suggestions on how to automate the process while keeping the PIN entry manual and secure? Thank you in advance for your help!139Views0likes0CommentsUse Powershell to print O365 Outlook Out of Office rules
I am looking into what I can pull for Outlook using Powershell but have only come across rules to get generic Rules & Alerts and generic settings for Out of Office. I want to be able to pull the rule settings for Out of Office, Actions and Conditions any suggestions?270Views0likes1CommentCant no longer change OWA's signature
Hello all, I am trying to update my Outlook Web's signature with Powershell, like I always do, with the "Set-MailboxMessageConfiguration" command, but the signature is not updated. But "Get-MailboxMessageConfiguration" shows that the new signature is there OWA allows now for some people/organitations to manage multiple signatures, but I can't find any documentation/information about that. So, how I can modify the already existing signature? Or, how I can create a new signature?10KViews6likes16CommentsHow to remove meeting invite sent by user who left the organization
We have a user who left the company back in December 22 and there are couple of re occuring meeting which i want to delete . I tried "search - mailbox - search query " but it's not working if anyone can help me the script to delete the meeting invites . Amy help would be highly appreciated. Thanks, Atul16KViews0likes6CommentsPowershell command to configure Automatic Accept / Decline in Calendar on Outlook for Workspaces
Hi, I am trying to create some desks using Outlook Workspaces in Room Finder. I have looked around online and don't seem to be able to find a command that will set the Automatic Accept / Decline in the Calendar so that the desk's cannot be double booked. Currently I only have 2 set up on a 365 Test Tenant and 1 of them is able to be double booked as I cannot set this without logging into the Outlook account online and setting in manually (The other desk I set manually by logging in). I have around 20/30 desks to set up in Room Finder so doing this manually would be very time consuming and being able to set them through Powershell would make my life a lot easier. Does anyone know of a command for Powershell that is able to do this?1.2KViews0likes2CommentsOutlook Audit Logs
Full disclosure: I have never used PowerShell before. This is a classic rabbit hole situation where I started trying to figure something out, which led me to another and another and now we're here. I wanted to be able to know who was doing what in a shared inbox. I was then told that I needed the Audit Log. I pull the Audit Log and needed to arrange the data. I was told how I had to set it up. Now that it's all set and works, I just need a regular flow of the data from the Audit Log. I asked if the pulls could be automated and I was told that I'd need to use PowerShell and the Search-UnifiedAuditLog cmdlet. I guess my question is: How indepth is what I have to do and where do I start?756Views0likes2CommentsAutomating OneNote text with format to new Outlook message
Hello, I’m getting into PS, I’d like to automate basic processes on my own PC to start. There’s a constant process I do day in and day out, wanted to eliminate all the clicking, copying, pasting, typing and automate it. Taking texts in its format from OneNote, to opening a new Outlook message, pasting the text in the same format into the body of the new message. So all I’d have to do is fill in the email address and subject then click send.910Views0likes2CommentsMicrosoft Powershell Signature Script - Stopped working with latest office 365
This is my first post on here, so I hope I get all the information across to you! Firstly, I know that there are paid solutions that can do this, but this solution has been working for the company that I work for a little while now. Therefore, I would like to get it working on all versions of office that we use on site - 2013 through to Office 365. Plus, it makes it a bit more interesting if something is maintained and created on site be it all slightly more difficult. I am a member of IT department and am completely stumped! The problem we see is that signatures have stopped pushing out to users with the latest office 365 build. On top of that, Microsoft won't let me update to this later version so therefore I am unable to diagnose the issue without great impact to certain affected users. I assume this as the signature screen looks completely different to mine but also have yet to confirm - will make this a priority this morning. The files and modified template files are reaching the Signature location within Windows Signature location, but the newest version of Office 365 does not pick this up. If I manually create a Signature within office the Files are all there, be it with a couple of extra files (rich text and text formats) as well as the ones created from the script but only the ones manually created appear in outlook. I am confident therefore it's not entirely the script but rather a change within outlook that has stopped the signatures from being pickup up Any ideas? Many thanks, Matthew # Gets the path to the user appdata folder $AppData = (Get-Item env:appdata).value # This is the default signature folder for Outlook $localSignatureFolder = $AppData+'\Microsoft\Signatures' # This is a shared folder on your network where the signature template should be $templateFilePath = **THE FILE PATH TO THE TEMPLATE SIGNAUTRE** # Get the current logged in username $un = $env:username # The following 5 lines will query AD and get an ADUser object with all information $filter = "(&(objectCategory=User)(samAccountName=$un))" $searcher = New-Object System.DirectoryServices.DirectorySearcher $searcher.Filter = $filter $ADUserPath = $searcher.FindOne() $ADUser = $ADUserPath.GetDirectoryEntry() # Now extract all the necessary information for the signature $name = $ADUser.DisplayName $email = $ADUser.mail $job = $ADUser.title $landline = $ADUser.telephonenumber $mobile = $ADUSer.mobile $office = $ADUser.physicalDeliveryOfficeName $so = $ADUser.description $adchangedate = $ADUser.whenChanged # Placeholder on html file association $namePlaceHolder = "\[DISPLAY_NAME\]" $emailPlaceHolder = "\[EMAIL\]" $jobPlaceHolder = "\[JOB_TITLE\]" $folderPlaceHolder = "\[FOLDER_PATH\]" $phonePlaceHolder = "\[TELEPHONE\]" $SOPlaceHolder = "\[SIGN_OFF\]" # Save it as <username>.htm $namefolder = $un + " (" + $email + ")_files"; $namefolder2 = $un + "_Reply (" + $email + ")_files"; $filename = $localSignatureFolder + "\" + $un + " (" + $email + ").htm"; $filename2 = $localSignatureFolder + "\" + $un + "_reply" + " (" + $email + ").htm"; $foldername = $localSignatureFolder + "\" + $namefolder; $foldername2 = $localSignatureFolder + "\" + $namefolder2; $templatefolderpath = $templateFilePath + "\Harboro_template_files\*"; $templatefolderpath2 = $templateFilePath + "\Harboro_Reply_template_files\*"; #NO EMAIL ON AD, NO SIGNATURE if ($email -ne "") { #change contents of template html file to work with the script below, only if template has been changed from the original #Asign varibale to pint at particlular file $rawtemp = get-content $templateFilePath"\Harboro_template.htm" $rawtemp2 = get-content $templateFilePath"\Harboro_Reply_template.htm" $check1 = ($rawtemp | Select-String -Pattern "Harboro_template_files").count $check2 = ($rawtemp2 | Select-String -Pattern "Harboro_Reply_template_files").count if ($check1 -ne 0 -or $check2 -ne 0) { #MAIN TEMPLATE CONTENTS $newContent = $rawtemp -replace "Harboro_template_files","[FOLDER_PATH]" $newContent | Set-Content -Path $templateFilePath"\Harboro_template.htm" -force #REPLY TEMPLATE CONTENTS $newContent2 = $rawtemp2 -replace "Harboro_Reply_template_files","[FOLDER_PATH]" $newContent2 | Set-Content -Path $templateFilePath"\Harboro_Reply_template.htm" -force #RESET THE RAWTEMP VARAIBLE WITH NEW FILE CONTENTS $rawtemp = get-content $templateFilePath"\Harboro_template.htm" $rawtemp2 = get-content $templateFilePath"\Harboro_Reply_template.htm" } #find place holders and convert them to users data from AD variables if ($so -eq "") { $sig = $rawtemp -replace $SOPlaceHolder,"" $rawtemp = $sig $sig2 = $rawtemp2 -replace $SOPlaceHolder,"" $rawtemp2 = $sig2 } else { $sig = $rawtemp -replace $SOPlaceHolder,$so $rawtemp = $sig $sig2 = $rawtemp2 -replace $SOPlaceHolder,$so $rawtemp2 = $sig2 } $sig = $rawtemp -replace $namePlaceHolder,$name $rawtemp = $sig $sig2 = $rawtemp2 -replace $namePlaceHolder,$name $rawtemp2 = $sig2 $sig = $rawtemp -replace $emailPlaceHolder,$email $rawtemp = $sig $sig2 = $rawtemp2 -replace $emailPlaceHolder,$email $rawtemp2 = $sig2 if ($mobile -ne "") { $phone = $landline + " Mobile: " + $Mobile } else { $phone = $landline } $sig = $rawtemp -replace $phonePlaceHolder,$phone $rawtemp = $sig $sig2 = $rawtemp2 -replace $phonePlaceHolder,$phone $rawtemp2 = $sig2 $sig = $rawtemp -replace $jobPlaceHolder,$job $rawtemp = $sig $sig2 = $rawtemp2 -replace $jobPlaceHolder,$job $rawtemp2 = $sig2 $sig = $rawtemp -replace $folderPlaceHolder,$namefolder $sig2 = $rawtemp2 -replace $folderPlaceHolder,$namefolder2 # Determines daylight saving $adchangedate = write-output $adchangedate $adchangedate = [DateTime]$adchangedate if ($adchangedate.IsDaylightSavingTime() -eq $true) { $adchangedate = $adchangedate.AddHours(1) } #IMAGES FOLDER #If Signature supporting folder exists checks if (Test-Path -Path $foldername) { $SourceDocs = Get-ChildItem –Path $templatefolderpath | foreach {Get-FileHash –Path $_.FullName} $DestDocs = Get-ChildItem –Path $foldername | foreach {Get-FileHash –Path $_.FullName} $count = (Compare-Object -ReferenceObject $SourceDocs -DifferenceObject $DestDocs -Property hash -PassThru).count $SourceDocs2 = Get-ChildItem –Path $templatefolderpath2 | foreach {Get-FileHash –Path $_.FullName} $DestDocs2 = Get-ChildItem –Path $foldername2 | foreach {Get-FileHash –Path $_.FullName} $count2 = (Compare-Object -ReferenceObject $SourceDocs2 -DifferenceObject $DestDocs2 -Property hash -PassThru).count # If changes in folder, then update else do nothing if ($count –ne 0){ Remove-Item -Path $foldername -recurse -force New-Item -Path $foldername -ItemType Directory Copy-Item -Path $templatefolderpath -Destination $foldername -PassThru -force; } if ($count2 –ne 0){ Remove-Item -Path $foldername2 -recurse -force New-Item -Path $foldername2 -ItemType Directory Copy-Item -Path $templatefolderpath2 -Destination $foldername2 -PassThru -force; } } else { # if folder does not exist then create directory New-Item -Path $foldername -ItemType Directory Copy-Item -Path $templatefolderpath -Destination $foldername -PassThru -force; New-Item -Path $foldername2 -ItemType Directory Copy-Item -Path $templatefolderpath2 -Destination $foldername2 -PassThru -force; } #MAIN SIGNATURE # Gets the last update time of the template. if(test-path $templateFilePath){ $templateLastModifiedDate = [datetime](Get-ItemProperty -Path $templateFilePath -Name LastWriteTime).lastwritetime } # Checks if there is a signature and its last update time if(test-path $filename){ $sigLastModifiedDate = [datetime](Get-ItemProperty -Path $filename -Name LastWriteTime).lastwritetime if((get-date $templateLastModifiedDate) -gt (get-date $sigLastModifiedDate)){ $sig > $filename } # If an AD change has been made and the created signature is older, then update signature. elseif(($adchangedate) -gt (get-date $sigLastModifiedDate)){ $sig > $filename } }else{ $sig > $filename } #REPLY SIGNATURE #CHECK IF THERE IS A SIGNATURE AND ITS LAST UPDATE TIME if(test-path $filename2){ $sigLastModifiedDate = [datetime](Get-ItemProperty -Path $filename2 -Name LastWriteTime).lastwritetime if((get-date $templateLastModifiedDate) -gt (get-date $sigLastModifiedDate)){ $sig2 > $filename2 } # If an AD change has been made and the created signature is older, then update signature. elseif(($adchangedate) -gt (get-date $sigLastModifiedDate)){ $sig2 > $filename2 } }else{ $sig2 > $filename2 } #SET DEFAULT SIGNATURE $MSWord = New-Object -ComObject word.application $EmailOptions = $MSWord.EmailOptions $EmailSignature = $EmailOptions.EmailSignature $EmailSignature.NewMessageSignature = $un + " (" + $email + ")" #insert the main signature name $EmailSignature.ReplyMessageSignature = $un + "_reply" + " (" + $email + ")" #insert the reply signature name $MSWord.Quit() }1KViews0likes0Comments