Browse Source

Update Download_Latest_Sophia.ps1

master
Dmitry Nefedov 4 days ago
parent
commit
d134815ebe
  1. 2
      Download_Latest_Sophia.ps1
  2. 2
      Download_Sophia.ps1

2
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

2
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

Loading…
Cancel
Save