Windows PowerShell is a command line shell and scripting language for Windows that supersedes the CMD.exe shell and batch language. PowerShell is also an automation engine for Windows that provides functionality similar to Windows Script Host and VBScript.

learn more… | top users | synonyms

1
vote
0answers
11 views

Find AD users with blank Password

Is there any way to find out users on my domain with blank password using powershell? We already have a policy set for this but with too many admin teams managing different parts of domain just want ...
1
vote
0answers
23 views

Java runs in batch but not Powershell

I have a batch file that runs a jar with a few parameters, works fine: @echo off java -cp bulkconfig.020.0005.jar com.hospira.bulkconfig.LoadConfig %* I would like to add some more cababilities ...
0
votes
0answers
26 views

Any way to do Linux-style sort --merge in Windows PowerShell?

In PowerShell, if I have two files that are already sorted and want to merge them into one big sorted file, it seems wasteful and inefficient to do gc file1, file2 | sort-object > newfile, ...
1
vote
1answer
30 views

Open the start menu using Powershell

Am currently working on a business process automation software and literally user actions are simulated by robots. I need to pass some information to the start menu of my windows 7 and i was wondering ...
0
votes
1answer
16 views

PowerShell can't create folder on network mount

I've create a drive with the Letter Z: and shared it so that the Network Path is: \\GOELA2682012SRV\srv2012r2 I now want to create a folder on there using PowerShell. This doesn't work: New-Item ...
1
vote
1answer
45 views

How can I create a Windows 10 taskbar shortcut to launch PowerShell with Administrator privileges?

Whenever I run PowerShell I almost exclusively need to run it in Administrator mode, however the taskbar shortcut only seems to enable this by right-clicking on the icon and selecting Run as ...
0
votes
0answers
12 views

Choco Install Mongodb throws internal server error 500

I am stuck on installing mongodb with chocolatey. This is the command I use: choco install mongodb I execute it in powershell with administrative rights. This is the error (translated from ...
0
votes
0answers
23 views

How to direct (Python) error messages printed in a PowerShell console to a text file

Firstly, the errors I'm interested in redirecting are NOT PowerShell errors, but those generated by a Python script that is called within my PowerShell script. I have read multiple post on here (and ...
0
votes
0answers
21 views

Accessing underlying object of SWbemObject instance [duplicate]

I'm using vbscript to interact with the WMI classes. I am querying the Win32_GroupUser class which is defined here https://msdn.microsoft.com/en-us/library/windows/desktop/aa394153%28v=vs.85%29.aspx. ...
0
votes
0answers
27 views

GUI Variables in Powershell [migrated]

I'm looking to setup a GUI that will determine the next step of a first time setup application. I originally programed the whole thing using batch but would like a more user friendly look. The program ...
0
votes
0answers
31 views

Looking to rename large amount of files using bat script

I'm still pretty new to the use of powershell, scripts, and the like, so I'm sorry that I don't have some form of script to start with. All I have is the specifics on my problem. I have a large ...
3
votes
0answers
37 views

Complex wmi queries using execquery

In powershell I can do a query like > get-wmiobject -query 'select * from win32_groupuser' | % {[wmi]$_.partcomponent|select domain,name,SID} Which will list for each wmi, the domain, name and ...
0
votes
0answers
37 views

How to find mp3 files on a remote server using Powershell

I have created a powershell script to search for mp3 files on my workstation. This is successful on my workstation, how can I run this on my network of 80 workstations? $strComputers = Get-Content ...
3
votes
1answer
58 views

Getting SID from win32_groupuser

I am trying to get the SIDs of users and groups by querying get-wmiobject -query 'select groupcomponent,partcomponent from win32_groupuser` output: __GENUS : 2 __CLASS : ...
0
votes
0answers
34 views

Script to get a list of users allowed to connect computer

I would like to inventory the users and groups that are allowed to connect to a computer (interactively or remotely). The computer can be either in a workgroup or in an active directory but primarily ...
0
votes
0answers
13 views

DC network location, when gateway is VM on same box [on hold]

I know the dos and don'ts of domain controllers, and my setup is most certainly ill advised, but when running this kind of setup from home, on the cheap, I have little choice. I have one physical ...
1
vote
1answer
20 views

Powershell KeyPress Modifiers

$Textbox.Add_Keydown({ If ($Args[1].key -eq 'Shift' -and $Args[1].key -eq 'Return'){Function A} ElseIf ($Args[1].key -eq 'Return'){Function B} }) I want to be able to make it do X on Shift+Enter ...
0
votes
0answers
21 views

Powershell keydown Shift+Enter

Foreach ($Var in $UserVariables){ $Var.Add_Keydown({ If ($Args[1].key -eq 'Shift' -and $Args[1].key -eq 'Return'){Export} ElseIf ($Args[1].key -eq 'Return'){Display} }) ...
0
votes
0answers
12 views

powershell or netcat over ADSL

is there anyway to use powershell for getting access to my office pc from home via my RDP Server i have 2 pc's : pc1 ( office ) connected via ADSL with dynamic ip pc2 ( RDP server ) static ip i ...
-2
votes
0answers
24 views

Moving Files from Local Drive to Network Drive

Windows Environment Scenario: Program is writing files to a local directory (e.g. c:). Issue: We want users to only use network shared drives. It is not possible to configure the program to write ...
-2
votes
0answers
55 views

How to uninstall an app installed with another user in Windows 10?

Yesterday I had a problem with my current user, and to solve it I had to create another user account in windows, and delete my previews account to be able to logon with my Microsoft Account in the New ...
1
vote
1answer
26 views

simple batch script not working PS, but works in cmd [duplicate]

I have a .bat script that just cds into a directory cddocs.bat cd \Users\Me\Documents\NetBeansProjects\ It is in my home folder. (C:\Users\Me) In cmd when I run it C:\Users\Me>cddocs ...
0
votes
1answer
22 views

How can I see users' Office 365 Password date (date last changed, date it will expire, etc.)?

I know I can see the password dates (date last changed, date it will expire, etc.) for our in-house Active Directory. How do I see this information for Office 365 accounts, either with PowerShell or ...
0
votes
0answers
17 views

powershell session in conemu is not seeing an odbc driver

If I open a powershell session normally I can run a script that uses the "PostgreSQL ANSI" odbc driver without issue. If I open a powershell session in conemu (same arch, same user) I get a "data ...
6
votes
1answer
653 views

Renaming files in a folder in Windows using Powershell

In a directory, I have some .jpg files. The file names are integers starting from 1.jpg to 150.jpg. I would like to subtract 1 from each file name. So the file names would be 0.jpg to 149.jpg. I ...
1
vote
0answers
14 views

Automated XP Mode install

I manage a conference lab environment, and one thing we would like to do is install the 1.0 version of our primary software, as a bit of a nostalgia playground. The thing is, this old version really ...
0
votes
1answer
52 views

ErrorCode: TargetDiskBlobAlreadyExists

I am creating an AzureRM VM using existing VHD, the error which I received is New-AzureRmVM -ResourceGroupName $rgname -Location $loc -VM $vm New-AzureRmVM : Long running operation failed with ...
2
votes
1answer
38 views

Removing lines from powershell txt file

I'm having to simulate killing of task from process list. I get process list, send it to the text file process.txt and then have user input the task they want to kill. My main problem, is I have to do ...
0
votes
0answers
77 views

What is the difference in Windows CMD and PowerShell redirection and text Encoding?

Granted, this is not a great title, but to be honest I was unsure how to word the question without posting an essay as the question. This description should add some flesh. Problem: I have a Python ...
0
votes
1answer
48 views

What is psprovider in powershell?

I am new to PowerShell and trying to understand the concept of psprovider. I know I can use Get-PSProvider to show a list of available psproviders All of the help I am finding, assumes I know things ...
1
vote
1answer
39 views

Powershell equivalent of 'msconfig'?

I use 'msconfig' to control what programs startup at boot (etc) - is there a powershell way of doing the same ? I tried: get-help startup This brings up: Register-PSSessionConfiguration ...
0
votes
0answers
22 views

Move-item with control if directory exist wont move the stuff inside this directory if the name contains a 1 infront

My code will move items from an existing structure to a new one. For this it has to take many folders and merge it to one. Sometimes there is a folder which exists. My script will now go inside the ...
0
votes
0answers
31 views

Windows 10 Bing Metro UI apps no longer open (e.g. News, Weather, Sport)

I recently did an upgrade to the latest Windows 10 insider preview (to test out the Ubuntu Bash on Windows). After testing I rolled back to a previous stable version (then disabled the insider ...
3
votes
2answers
70 views

How to list windows privileges for any user

I am trying to write a script to list the privileges (eg SeShutDownPrivilege etc) of all user accounts. I'd prefer it if my script could be run as a standard user, but I can run it as an admin account ...
0
votes
0answers
35 views

How to read pdf custom properties using Powershell

I am trying to read custom Document properties of PDF file using PowerShell script. I could able to read Microsoft documents, but I am unable to read PDF metadata. Your reply is highly appreciated. I ...
1
vote
1answer
22 views

How to recursively delete directories skipping some directories/files from command line in windows?

Suppose I have a complex path of directories: <ROOT> folder1 folder2 sub1 sub2 folder3 sub1 sub2 ... and suppose in some folders there are files named "skip.me" How ...
0
votes
1answer
16 views

PowerShell environment variable missing

I have the situation. One of PowerShell environment variable has been missing several times. I have to manually add it ($env:path +=';C:\Program Files\Docker Toolbox') and reboot my desktop. I am ...
0
votes
0answers
16 views

Monitoring file activity - bulk renaming, creating - Ransomware activity

Masters, I need some suggestion how to monitor the disks for bulk file activity like bulk renaming, bulk creating..etc.. Is it possible with performance monitor or should i use powershell? I would ...
0
votes
0answers
42 views

Transfer file to Windows Server 2008 R2

In a LAN, I have a Windows Server 2008 R2 machine; access to server through Remote Desktop is granted both 1) from a LAN host 2) from the internet, thanks to a virtual server configured in the ...
0
votes
0answers
48 views

How do I tail Windows 10 Update Log

I have a following batch file that runs on startup wuauclt.exe /detectnow /updatenow start /min C:\Windows\WindowsUpdate.log But now in Windows 10 log file simply has the following Windows ...
0
votes
1answer
48 views

HTTP request from PowerShell has wrong remote IP

I am trying to write a PowerShell script that performs an HTTP request. The request is handled by a PHP script which needs to know the IP address of the client. To this end, it reads ...
-1
votes
0answers
64 views

Re-PROVISION Windows Store app? (Add-AppxPROVISIONEDPackage?)

I'm familiar with how to re-install the Windows Store app for a particular user. (Restore Microsoft Store application in Windows 10, Windows 10: Restore Windows Store App, Install Windows Store App ...
1
vote
1answer
24 views

wmic command returns no instance when accessing Win32_BaseBoard class

Why does Win32_BaseBoard return no instances in PowerShell? wmic path "Win32_BaseBoard" get "Model"
0
votes
0answers
14 views

Passing parameters to powershell script

I've been trying to create a small powershell script that upgrades all my packages using Chocolatey on Windows. Here's what I've already got: param( [string]$mode = "upgrade" ) //This I use to ...
1
vote
1answer
25 views

Powershell console not updating with latest Windows Management Framework installs

I am using Windows 7 SP 1 64 bit. When I installed Windows Management Framework 4, the nice new blue consoles have not been installed. I even further upgraded to Windows Management Framework 5 and ...
0
votes
0answers
37 views

Local ovf to Hyper V using Virtual Machine Converter with Powershell

Now that I want convert and import a vmware VM to Hyper V. My ovf file with vmdk amd mf files are located in C:\OvfHVTest2. I used the command in powershell: Import-Module "C:\Program ...
3
votes
1answer
39 views

Get-Hotfix showing updates are installed at 12.00 am but actually it is not

I ran the below command in powershell. it is showing 12:00:00 AM as Installed time. but actually I pushed it at 3:00 AM. So how to get the actual time? Get-Hotfix -ComputerName XXXX | Where-Object ...
0
votes
0answers
29 views

How to connect to a wireless Display adapter automatically through scripts or Task Scheduler?

I am trying to project files to a Samsung TV which has a windows display adapter. I want to automate the entire process. So when the TV is switched on, I want the computer to continuously check for ...
2
votes
0answers
28 views

Powershell hangs on error

I just upgraded from Powershell 3.0 to 4.0 (http://www.microsoft.com/en-nz/download/details.aspx?id=40855) If I now run Powershell and enter a garbage command (e.g. Blah), Powershell will display an ...
0
votes
0answers
23 views

I need a simple powershell script to send server usage,memory,disk space, I/o metric to graphite from a local machine through http protocol

I',m a beginner. I need a powershell script to send the metric such as cpu usage,disk space, server speed etc to graphite through TCP http