Jump to content


DanLikesEnterpriseManager

New Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About DanLikesEnterpriseManager

  • Rank
    Newbie
  1. The script the Microsoft has posted doesn't work. It may have at one time. This is what I have used. [String]$LogfileName = "OneDriveDetection" [String]$Logfile = "$env:SystemRoot\logs\$LogfileName.log" [string]$UserName [string]$UserSplit Function Write-Log { Param ([string]$logstring) If (Test-Path $Logfile) { If ((Get-Item $Logfile).Length -gt 2MB) { Rename-Item $Logfile $Logfile".bak" -Force } } $WriteLine = (Get-Date).ToString() + " " + $logstring Add-content $Logfile -value $WriteLine } #$User = gwmi win32_com
×
×
  • Create New...