Show Full Free/Busy Details for Exchange Server 2010 Room and Resource Mailboxes

HowTo

Source: https://practical365.com/exchange-server/show-full-freebusy-exchange-2010-room-resource-mailboxes/

 

Deploy powershell script like SCCM application

HowTo, PowerShell Scrtips

Have some files and wish to come to a distillation folder using SCCM. It necessary to look like application deploy.

  1. Create PS script like this for Install

    2. Create PS script for uninstall

    3. Create two cmd scripts for run powershell ps1 files when user press «install» and «uninstall» using sccm software center

    4. Create application in SCCM

Quick copy software to target location by powershell

HowTo

 

Set autoreply state for mailbox

HowTo

 

Export/import AD objects (users, OUs)

HowTo, PowerShell Scrtips

 

PowerShell Regex To Get Value Between Quotation Marks

HowTo, PowerShell Scrtips
SOURCE: https://workingsysadmin.com/quick-tip-powershell-regex-to-get-value-between-quotation-marks/

If you’ve got a value like the following…

 

… that maybe came from the body of a file, was returned by some other part of a script, etc., and you just want the portions that are actually between the quotes, the quickest and easiest way to get it is through a regular expression match.

That’s right, forget splitting or trimming or doing other weird string manipulation stuff. Just use the [regex]::matches() feature of PowerShell to get your values.

Matches takes two parameters. 1. The value to look for matches in, in this case the here-string in my $s variable, and 2. The regular expression to be used for matching. Since Matchesreturns a few items, we are making sure to just select the value for each match.

So what is that regex doing? Let’s break it down into it’s parts.

  • (?<=\”) this part is a look behind as specified by the ?<= part. In this case, whatever we are matching will come right after a quote. Doing the look behind prevents the quotation mark itself from actually being part of the matched value. Notice I have to escape the quotation mark character.
  • .+? this part basically matches as many characters as it takes to get to whatever the next part of the regex is. Look into regex lazy mode vs greedy mode.
  • (?=\”) this part is a look ahead as specified by the ?= part. We’re looking ahead for a quotation mark because whatever comes after our match is done will be a quotation mark.

So basically what we’ve got is “whatever comes after a quotation mark, and as much of that as you need until you get to another quotation mark”. Easy, right? Don’t you love regex?