<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>scripting on Notities</title><link>https://www.vandenboom.icu/en/categories/scripting/</link><description>Recent content in scripting on Notities</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Mon, 13 Dec 2021 19:12:03 +0100</lastBuildDate><atom:link href="https://www.vandenboom.icu/en/categories/scripting/index.xml" rel="self" type="application/rss+xml"/><item><title>Powershell Clean Memory</title><link>https://www.vandenboom.icu/en/blog/powershell-clean-memory/</link><pubDate>Mon, 13 Dec 2021 19:12:03 +0100</pubDate><guid>https://www.vandenboom.icu/en/blog/powershell-clean-memory/</guid><description>Function Clean-Memory { Get-PSSession | Remove-PSSession [System.GC]::Collect() [GC]::Collect() [GC]::WaitForPendingFinalizers() Get-Variable | #Where-Object { $startupVariables -notcontains $_.Name } | ForEach-Object { try { Clear-Variable -Name &amp;#34;$($_.Name)&amp;#34; -Force -ErrorAction SilentlyContinue -WarningAction SilentlyContinue Remove-Variable -Name &amp;#34;$($_.Name)&amp;#34; -Force -Scope &amp;#34;global&amp;#34; -ErrorAction SilentlyContinue -WarningAction SilentlyContinue Remove-Variable -Name &amp;#34;$($_.Name)&amp;#34; -Force -ErrorAction SilentlyContinue -WarningAction SilentlyContinue #Write-Host &amp;#34;Variable &amp;#39;$($_.Name)&amp;#39; has been cleaned up.&amp;#34; } catch [Exception] { if ($_.Name -notlike &amp;#39;&amp;#39;) { Write-Host &amp;#34;An error has occured. Error Details: $($_.</description></item></channel></rss>