diff --git a/Download_Latest_Sophia.ps1 b/Download_Latest_Sophia.ps1 index 025991de..c6b96d57 100644 --- a/Download_Latest_Sophia.ps1 +++ b/Download_Latest_Sophia.ps1 @@ -12,8 +12,6 @@ Clear-Host [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -Remove-Variable * -ErrorAction Ignore - # Checking whether the logged-in user is an admin $CurrentUserName = (Get-CimInstance -ClassName Win32_Process -Filter ProcessId=$PID | Invoke-CimMethod -MethodName GetOwner | Select-Object -First 1).User $LoginUserName = (Get-CimInstance -ClassName Win32_Process -Filter "name='explorer.exe'" | Invoke-CimMethod -MethodName GetOwner | Select-Object -First 1).User diff --git a/Download_Sophia.ps1 b/Download_Sophia.ps1 index 24cb3c15..675d7e53 100644 --- a/Download_Sophia.ps1 +++ b/Download_Sophia.ps1 @@ -12,8 +12,6 @@ Clear-Host [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -Remove-Variable * -ErrorAction Ignore - # Checking whether the logged-in user is an admin $CurrentUserName = (Get-CimInstance -ClassName Win32_Process -Filter ProcessId=$PID | Invoke-CimMethod -MethodName GetOwner | Select-Object -First 1).User $LoginUserName = (Get-CimInstance -ClassName Win32_Process -Filter "name='explorer.exe'" | Invoke-CimMethod -MethodName GetOwner | Select-Object -First 1).User