All Questions
Tagged with wsh powershell
49
questions
-1
votes
1
answer
3k
views
Activate Windows License
When I use slmgr /skms <URL> | cmd command in PowerShell it shows me a pop up that I must press the ok button after that I run slmgr /ato | cmd and again shows me another pop up that I press the ...
0
votes
1
answer
575
views
powershell spawned by .vbs file does not recognize script files... (Windows 11)
I'm simply trying to run a .ps1 from a .vbs (did this before on w10)
C:\Scripts\Test.vbs
command = "powershell.exe -ExecutionPolicy Bypass -nologo -command C:\Scripts\Test.ps1"
set shell = ...
0
votes
0
answers
34
views
why [CONSOLE]::NumberLock is not working in remote destop system [duplicate]
when i run below command it works fine in my local system but don't know why it not working in remote aws server
@start /wait powershell.exe -nologo -WindowStyle Hidden -command "IF ([console]::...
-1
votes
3
answers
10k
views
VBA - WScript.Shell - Executing A PowerShell Command
I want to execute a PowerShell Command from VBA using WScript.Shell
Here is the string that gets sent to WScript.Shell:
Powershell -ExecutionPolicy Bypass -Command $FilesInPathway = get-childitem -...
3
votes
2
answers
10k
views
Use PowerShell to create a shortcut to launch a PowerShell script
I have a need to create a shortcut on a Windows 2019 Server for the Eclipse application so that it runs a PowerShell script instead of opening Eclipse. The script runs a few commands first and then ...
0
votes
0
answers
96
views
Script not running hidden
The following script will run if I run it minimized but not if I run it hidden. What am I doing wrong?
#The intention of this script is to function as a keepalive.
#The command used ...
1
vote
2
answers
798
views
powershell invoke-command exchange mgmt shell from vba with stdout and stderr retrieval and no credential popup
The following requirement(s) I have:
As domain admin user logged on to an administrative client machine
I want to perform some changes on an exchange server using calls
from vba(excel 2013) via ...
1
vote
2
answers
4k
views
Is there a way to run a popup window while a script runs?
I am creating a gui, and want a popup to let you know it's busy, but then close when it's completed that specific task. The only thing i can find is the following...
$popup = New-Object -ComObject ...
0
votes
1
answer
223
views
VBScript calling PowerShell results in runaway cscript process
I was tasked with getting the versions and counts of PowerShell in our infrastructure. I decided to use a VBScript instead of trying to take into account which PoSh versions would run which commands, ...
1
vote
1
answer
4k
views
Change target of shortcut created in Powershell
I've got a script that installs a certain BP Program called iLink (Crosslink). The Script works fine and installs Java 6.21 and both Crosslink Components and also installs through DISM .Net 3.5 ...
0
votes
1
answer
443
views
Cannot create Windows shortcuts in PowerShell on Linux
I want to use scripts to create shortcuts under the Windows operating system (.lnk).
In the Windows environment, I chose PowerShell, wrote the script, successfully created .lnk.
$shell = New-Object -...
2
votes
0
answers
202
views
Assigning Background Colour to Created Shortcut to Console?
I have a PowerShell script that creates a new shortcut via Window Scripting Host.
The target is a console program, and I wish to set the "Screen Background" colour, as seen on the "Colors" tab in the ...
0
votes
1
answer
1k
views
Use variable in WScript.Run
The following works fine:
VBScript
Script = "C:\Users\bob\Downloads\Logon scripts\Script.ps1"
Dim oSHELL
Set oSHELL = CreateObject("WScript.Shell")
oSHELL.Run "powershell.exe -ExecutionPolicy Bypass ...
1
vote
1
answer
433
views
Is it possible to react to a VBScript msgbox from a PowerShell script?
I've been working to make manual processes more of a one-click process and I've run into an issue with these msgbox popups from a VBScript script.
Essentially, I am using PowerShell and doing ...
0
votes
0
answers
1k
views
Issue Mapping User's Home Drive in Windows 10
In the environment that I work in, sometimes the user's Active Directory (AD) home drive is not mapped when they logon because they are not connected to the network. Later, when they do connect to ...