de-DEen-GB
 
rss

Just can't get enough of IT

This blog is about mostly anything in IT. But the primary focuses are Microsoft Technologies like Exchange, Office 365, Azure and Cloud Security.

OneDrive for BusinessYou are interested in OneDrive and OneDrive for Business?
You want to know how you can integrate the OneDrive technology into your IT infrastructure securely? 

Here is the list of OneDrive related sessions at Microsoft Ignite 2017

Monday

Tuesday

Wednesday

Thursday

Friday

See you at Microsoft Ignite!

Read More »

Microsoft Ignite 2017It's going to be an interesting week next week at Microsoft Ignite in Orlando, FL.

There will be a lot announcements about Microsoft Technologies to come. 

The conference is the best opportunity to learn about new technologies and to extend your IT professional network.

If you want to talk about OneDrive for Business, Exchange On-Premises and Exchange Online solutions, or how you can move to cloud service contact me by email or Twitter to schedule a meeting.

See you in Orlando.

 

 

Read More »
On September 14, 2017
0 Comment
58 Views

Starting September 11th 2017 Microsoft Teams supports guest access for external users

Guest access for Microsoft Teams uses a separate guest license type that must be activated in the services & add-ons section of the Office 365 Admin portal. 

Activate Microsoft Teams Guest License Type

 

Office 365 Admin portal notification:

When we make this change, the ‘Pick the license you want to configure’ setting in ‘Settings > Services and Add-ins > Microsoft Teams’, will now have an option for ‘Guest’ with a default value of “off” for the ‘Turn Microsoft Teams on or off for your entire organization’ setting.

When you've not activated guest licenses, external user receive an odd error when trying to access your shared team.

Link

 

Enjoy Office 365!

 

 

 

Read More »

The PowerShell script to purge Exchange Server and IIS log files has been updated to version 2.1.

The function Copy-LogFiles has been slightly rewritten and there has been a change in the cmdlet parameters.

When using ArchiveMode CopyAndZip or CopyZipAndDelete all copied log files in the EXCHANGESERVER\LOGS folder are added to a compressed archive. The script creates a separate archive for IIS and Exchange logs.

Example of compressed archive files

 Code updated

function Copy-LogFiles {
  [CmdletBinding()]
  param(
    [string]$SourceServer,
    [string]$SourcePath,
    $FilesToMove,
    [string]$ArchivePrefix = ''
  )

  if($SourceServer -ne '') { 

    # path per SERVER for zipped archives
    $ServerRepositoryPath = Join-Path -Path $RepositoryRootPath -ChildPath $SourceServer

    # subfolder used as target for copying source folders and files
    $ServerRepositoryLogsPath = Join-Path -Path $ServerRepositoryPath -ChildPath $LogSubfolderName

    $ServerRepositoryPath = Join-Path -Path $RepositoryRootPath -ChildPath $SourceServer

    if(!(Test-Path -Path $ServerRepositoryPath)) {

      # Create new target directory for server, if does not exist
      $null = New-Item -Path $ServerRepositoryPath -ItemType Directory -Force -Confirm:$false

    }

    foreach ($File in $FilesToMove) {
      # target directory
      $targetDir = $File.DirectoryName.Replace($TargetServerFolder, $ServerRepositoryLogsPath)

      # target file path
      $targetFile = $File.FullName.Replace($TargetServerFolder, $ServerRepositoryLogsPath)
      
      # create target directory, if not exists
      if(!(Test-Path -Path $targetDir)) {$null = mkdir -Path $targetDir}

      # copy file to target
      $null = Copy-Item -Path $File.FullName -Destination $targetFile -Recurse -Force -Confirm:$false -ErrorAction SilentlyContinue

    }    
    
    if($ZipArchive) {
      # zip copied log files
      
      $Archive = Join-Path -Path $ServerRepositoryPath -ChildPath ('{0}-{1}' -f $ArchivePrefix, $ArchiveFileName)
      $logger.Write(('Zip copied files to {0}' -f $ArchiveFileName))
      
      # delete archive file, if already exists
      if(Test-Path -Path $Archive) {Remove-Item -Path $Archive -Force -Confirm:$false}

      try {
        # create zipped asrchive
        Add-Type -AssemblyName 'System.IO.Compression.FileSystem'
        [IO.Compression.ZipFile]::CreateFromDirectory($ServerRepositoryLogsPath,$Archive)
      }
      catch {
        $logger.Write(('Error compressing files from {0} to {1}' -f $ServerRepositoryLogsPath, $Archive),3)      
      }
      finally {

        # cleanup, if compression was successful
        if($DeleteZippedFiles) {

          $logger.Write(('Deleting folder {0}' -f $ServerRepositoryLogsPath))
          $null = Remove-Item -Path $ServerRepositoryLogsPath -Recurse -Force -Confirm:$false -ErrorAction SilentlyContinue

        }
      }
    } 
  }  
}

 

Note

Links

Social

 

 

Read More »
On August 31, 2017
0 Comment
158 Views

PowerShellDescription

This script converts Word compatible documents to a selected format utilizing the Word SaveAs function. Each file is converted by a single dedicated Word COM instance.

The script converts either all documents in a single folder of a matching an include filter or a single file.

Currently supported target document types:

  • Default --> Word 2016
  • PDF
  • XPS
  • HTML

The conversion is handled by Word itself, utilizing the SaveAs method.

The Word.Document.SaveAs method supports the following wdFormat values:

Name Value Description
wdFormatDocument 0 Microsoft Office Word 97 - 2003 binary file format.
wdFormatDocument97 0 Microsoft Word 97 document format.
wdFormatTemplate 1 Word template format.
wdFormatTemplate97 1 Word 97 template format.
wdFormatText 2 Microsoft Windows text format.
wdFormatTextLineBreaks 3 Windows text format with line breaks preserved.
wdFormatDOSText 4 Microsoft DOS text format.
wdFormatDOSTextLineBreaks 5 Microsoft DOS text with line breaks preserved.
wdFormatRTF 6 Rich text format (RTF).
wdFormatEncodedText 7 Encoded text format.
wdFormatUnicodeText 7 Unicode text format.
wdFormatHTML 8 Standard HTML format.
wdFormatWebArchive 9 Web archive format.
wdFormatFilteredHTML 10 Filtered HTML format.
wdFormatXML 11 Extensible Markup Language (XML) format.
wdFormatXMLDocument 12 XML document format.
wdFormatXMLDocumentMacroEnabled 13 XML document format with macros enabled.
wdFormatXMLTemplate 14 XML template format.
wdFormatXMLTemplateMacroEnabled 15 XML template format with macros enabled.
wdFormatDocumentDefault 16 Word default document file format. For Word, this is the DOCX format.
wdFormatPDF 17 PDF format.
wdFormatXPS 18 XPS format.
wdFormatFlatXML 19 Open XML file format saved as a single XML file.
wdFormatFlatXML 20 Open XML file format with macros enabled saved as a single XML file.
wdFormatFlatXMLTemplate 21 Open XML template format saved as a XML single file.
wdFormatFlatXMLTemplateMacroEnabled 22 Open XML template format with macros enabled saved as a single XML file.
wdFormatOpenDocumentText 23 OpenDocument Text format.
wdFormatStrictOpenXMLDocument 24 Strict Open XML document format.

Implemented document formats are shown in bold.

Examples

# EXAMPLE
# Convert all .doc files in E:\temp to Default

.\Convert-WordDocument.ps1 -SourcePath E:\Temp -IncludeFilter *.doc 

# EXAMPLE
# Convert all .doc files in E:\temp to XPS

.\Convert-WordDocument.ps1 -SourcePath E:\Temp -IncludeFilter *.doc -TargetFormat XPS

# EXAMPLE
# Convert a single document to Word default format

.\Convert-WordDocument.ps1 -SourcePath E:\Temp\MyDocument.doc

Version History

  • 1.0, Initial community release

Links

Follow

 

 

 

Read More »