keronbucks.blogg.se

Sample powershell scripts to list directory contents
Sample powershell scripts to list directory contents








sample powershell scripts to list directory contents
  1. SAMPLE POWERSHELL SCRIPTS TO LIST DIRECTORY CONTENTS HOW TO
  2. SAMPLE POWERSHELL SCRIPTS TO LIST DIRECTORY CONTENTS UPDATE

$datum | Add-Member -MemberType NoteProperty -Name VideoCreatorEmail -Value $ $datum | Add-Member -MemberType NoteProperty -Name VideoCreatorName -Value $

sample powershell scripts to list directory contents

$datum | Add-Member -MemberType NoteProperty -Name VideoURL -Value $($StreamPortalVideoViewRoot + $myVideo.id) $datum | Add-Member -MemberType NoteProperty -Name VideoName -Value $myVideo.name $datum | Add-Member -MemberType NoteProperty -Name VideoID -Value $myVideo.id Write-Host " => Video Description: ", $scription -ForegroundColor Magenta Write-Host " => Video Creator Name: ", $, " - Email:", $ -ForegroundColor Magenta Write-Host " => Video Metrics views:", $, "- comments:", $ -ForegroundColor Magenta Write-Host " => Video Name:", $myVideo.name," created:", $myVideo.created,"- modified:", $myVideo.modified -ForegroundColor green Write-Host " => Video (N°", $videoscounter ,") ID:", $myVideo.id -ForegroundColor green Write-host "You have " $ " videos in Stream, using these selection criteria"įoreach($myVideo in $VideosjsonAggregateddata.value) #Read-Host -Prompt "Press Enter to continue. #Write-Host " => Channel JSON Raw data:", $Videosjsondata -ForegroundColor green $VideosjsonAggregateddata += $Videosjsondata $Videosjsondata = Get-Content -Raw -Path $fileItem.FullName | ConvertFrom-Json

SAMPLE POWERSHELL SCRIPTS TO LIST DIRECTORY CONTENTS UPDATE

  • update each variable marked with #> Update > REMOVES all exiisting JSON files > getting content of JSON File:", $fileItem, "- Path:", $fileItem.FullName -ForegroundColor Yellow.
  • It took me about 20minutes to export information about 591 videos (about 3 hours to make the script).

    SAMPLE POWERSHELL SCRIPTS TO LIST DIRECTORY CONTENTS HOW TO

    That said this solution relies on you knowing a bit about PowerShell, being a Stream Admin and being happy to manually save some files (I couldn't figure out how to do pass through windows authentication for the script) so you have to manually save each paged JSON file of 100 videos.

    sample powershell scripts to list directory contents

    Also so I could figure out how much work there was to do in moving, and how much video is created and not used. My goal was to get a list of all videos in my stream so that I could contact each video creator about the changes that are coming to stream.










    Sample powershell scripts to list directory contents