---
title: "FSLogix und Memtime: PowerShell Script"
description: This PowerShell script can help programs such as Memtime, which have an auto-start function, to work with FSLogix profiles.
---

[Skip to content](https://knowledgebase.memtime.com/en/fslogix-und-memtime-powershell-script#main-content)

- [English](https://knowledgebase.memtime.com/en/fslogix-und-memtime-powershell-script)
- [Deutsch](https://knowledgebase.memtime.com/de/fslogix-und-memtime-powershell-script)

English

Show submenu for translations

![memtime-light-2x.png.png\]](https://knowledgebase.memtime.com/hs-fs/hubfs/memtime-light-2x.png.png?height=40&name=memtime-light-2x.png.png)

Open main navigation

Close main navigation

- - [English](https://knowledgebase.memtime.com/en/fslogix-und-memtime-powershell-script)
    - [Deutsch](https://knowledgebase.memtime.com/de/fslogix-und-memtime-powershell-script)

  English
  
  Show submenu for translations
- [Go to memtime.com](https://www.memtime.com/)

[Go to memtime.com](https://www.memtime.com/)

 Hi 🦥 How can we help you?

- There are no suggestions because the search field is empty.

1. [Memtime Knowledge Base](https://knowledgebase.memtime.com/en?hsLang=en)
2. [🧩 Integrations](https://knowledgebase.memtime.com/en/integrations?hsLang=en)
3. [DATEV Integration](https://knowledgebase.memtime.com/en/integrations?hsLang=en#datev-integration)

# FSLogix und Memtime: PowerShell Script

## This PowerShell script can help programs such as Memtime, which have an auto-start function, to work with FSLogix profiles.

#### **What the Script Does**

The PowerShell script handles this safely and automatically:

1. Stops Memtime only in the current user session 
     1. Includes domain and user ownership check
     2. Does not affect other users on the same server
2. Waits until FSLogix reports that the profile for the current SID is attached
3. Starts Memtime only after the profile is ready
4. Works reliably in multi-user RDS environments

Save the script as:

```
# ================================# Start-Memtime-After-FSLogix.ps1# (multi-user-sicher, FSLogix-wait)# ================================$ErrorActionPreference = "SilentlyContinue"$memtimeExe = "C:\Program Files\memtime\memtime.exe"$timeoutSec = 120$sleepSec   = 2# Aktuellen Benutzer / SID$identity  = [System.Security.Principal.WindowsIdentity]::GetCurrent()$sid       = $identity.User.Value$domain    = $env:USERDOMAIN$user      = $env:USERNAME# --- Memtime nur für diesen User beenden (nicht andere Sessions) ---Get-CimInstance Win32_Process -Filter "Name='memtime.exe'" |  ForEach-Object {    $owner = Invoke-CimMethod -InputObject $_ -MethodName GetOwner    if ($owner.Domain -eq $domain -and $owner.User -eq $user) {      Stop-Process -Id $_.ProcessId -Force    }  }function Test-FSLogixProfileReady([string]$sid) {  $base = "HKLM:\SOFTWARE\FSLogix\Profiles\Sessions"  if (-not (Test-Path $base)) { return $false }  foreach ($k in Get-ChildItem $base) {    $p = Get-ItemProperty $k.PSPath    if ($p.Sid -eq $sid -and $p.ProfileImagePath -and $p.ProfileImagePath.Length -gt 3) {      return $true    }  }  return $false}# --- Warten bis FSLogix bereit ist (oder Timeout) ---$deadline = (Get-Date).AddSeconds($timeoutSec)while ((Get-Date) -lt $deadline) {  if (Test-FSLogixProfileReady $sid) { break }  Start-Sleep -Seconds $sleepSec}# --- Memtime starten (nur wenn nicht schon läuft) ---$alreadyRunning = Get-CimInstance Win32_Process -Filter "Name='memtime.exe'" | ForEach-Object {  $owner = Invoke-CimMethod -InputObject $_ -MethodName GetOwner  ($owner.Domain -eq $domain -and $owner.User -eq $user)} | Where-Object { $_ } | Select-Object -First 1if (-not $alreadyRunning) {  Start-Process -FilePath $memtimeExe}
```

### Deployment via GPO (Scheduled Task)

Deploy the script as a scheduled task via Group Policy.

#### **Path**

User Configuration → Preferences → Control Panel Settings → Scheduled Tasks

#### **Action**

1. **Program:** powershell.exe
2. **Arguments:**
   
   ```
   -NoProfile -ExecutionPolicy Bypass -File "\\DOMAIN\SYSVOL\DOMAIN\scripts\Start-Memtime-After-FSLogix.ps1"
   ```
3. **Trigger:** At log on
4. **Options:** Run only when the user is logged on

If you require any further assistance, feel free to contact us at support@memtime.com.

- [🚀 Getting started](https://knowledgebase.memtime.com/en/getting-started?hsLang=en)
- [🧠 Memory Aid](https://knowledgebase.memtime.com/en/memory-aid?hsLang=en)
- [📁 Memtime Projects](https://knowledgebase.memtime.com/en/memtime-projects?hsLang=en)
- [⏳ Time entries](https://knowledgebase.memtime.com/en/time-entries?hsLang=en)
- [👥 Customer Portal](https://knowledgebase.memtime.com/en/customer-portal?hsLang=en#main-content)

    - [Managing Users](https://knowledgebase.memtime.com/en/customer-portal?hsLang=en#managing-users)
    - [Purchasing Memtime](https://knowledgebase.memtime.com/en/customer-portal?hsLang=en#purchasing-memtime)
    - [Account Management](https://knowledgebase.memtime.com/en/customer-portal?hsLang=en#account-management)
- [📉 Reports & Statistics](https://knowledgebase.memtime.com/en/reports-statistics?hsLang=en)
- [🧩 Integrations](https://knowledgebase.memtime.com/en/integrations?hsLang=en#main-content)

    - [Calendar Integrations](https://knowledgebase.memtime.com/en/integrations?hsLang=en#calendar-integrations)
    - [DATEV Integration](https://knowledgebase.memtime.com/en/integrations?hsLang=en#datev-integration)
    - [Project Management](https://knowledgebase.memtime.com/en/integrations?hsLang=en#project-management)
    - [Telephone Integrations](https://knowledgebase.memtime.com/en/integrations?hsLang=en#telephone-integrations)
- [🖥️ Guides for Admins](https://knowledgebase.memtime.com/en/%EF%B8%8F-guides-for-admins?hsLang=en)
- [🛠️ Troubleshooting](https://knowledgebase.memtime.com/en/%EF%B8%8F-troubleshooting?hsLang=en#main-content)

    - [Microsoft Windows](https://knowledgebase.memtime.com/en/%EF%B8%8F-troubleshooting?hsLang=en#microsoft-windows)
    - [macOS](https://knowledgebase.memtime.com/en/%EF%B8%8F-troubleshooting?hsLang=en#macos)
    - [Linux](https://knowledgebase.memtime.com/en/%EF%B8%8F-troubleshooting?hsLang=en#linux)
    - [Integrations](https://knowledgebase.memtime.com/en/%EF%B8%8F-troubleshooting?hsLang=en#integrations)

[![Chill listening crop-3](https://knowledgebase.memtime.com/hs-fs/hubfs/memtime-light-2x.png.png?width=133&height=24&name=memtime-light-2x.png.png "Chill listening crop-3")](http://www.memtime.com)

Knowledge Base

Copyright © 2026, Memtime GmbH