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
188 views

Excel VBA that calls Powershell ActiveDirectory cmdlet, but Module won't load?

I have a powershell script I use to dump user and computer lists to csv files; it works great and I don't want to touch it much. It uses the ActiveDirectory cmdlet, and the Get-ADComputer and ...
2
votes
1answer
1k views

Get Network Printers From A Remote Computer

I am using this to attempt to get a list of printers on a remote computer: Get-WmiObject win32_printer -ComputerName "$oldPcName" The problem is I only get local printers, not those printers from ...
3
votes
3answers
84 views

Temporary Password for Domain Admin

A small non-profit company handling confidential information must grant remote domain admin access to their external IT services provider who manages the entire network, including new PCs, etc... ...
1
vote
1answer
35 views

Why does powershell launch tiny?

My powershell window launches tiny, despite the defaults being fine. To adjust I have to go into properties for the window, which fixes it but also displays an error. What can I do to have it ...
0
votes
1answer
26 views

How to replace text in last column?

Is there an easy way how to convert text in last column(8) if last 3 characters of the string are "-TA" So for example if text string in last column is "AB-TA" it will convert text to "AB.NO" If the ...
1
vote
1answer
15 views

Solution for media presentation - windows 7 [closed]

I'm looking for a solution to use a Windows 7 computer to act as a media presenter, with as little third party software as possible. Idea is to create a PS script or something that scans a ...
0
votes
1answer
967 views

How do I detect and skip locked files in a PowerShell script?

So I have myself a PowerShell script that after much headaches I got working. Ii deletes files I no longer want and everything is great. Only one issue, it will delete a file whether it is open by ...
1
vote
1answer
80 views

Split large text file according to record values

There are some questions alike in this site, but mine is a bit different. I have a 30 GB text file, and I need to split it into smaller files according to the different record values. For example; ...
1
vote
1answer
180 views

Extract site names from properties application pool

there are 2 sites that working in one pool. Me need to extract the names of the sites for future use. I use next command for exp. PS C:\> Get-Item IIS:\AppPools\tech-2 Name ...
0
votes
1answer
250 views

using powershell, is it possible to convert an XLSX file to XLS?

As the title states, is this possible? I found some scripts for XLS to XLSX, but not the other way around. Can this be done with powershell? Thanks
0
votes
0answers
30 views

EventLog Source “Connect”. No events in EventLog

I'm baffled by this, as I can find no documentation on wether or not "Connect" or "Connection" is some kind of registered keyword for EventLog Sources. I'm trying to create an EventLog Source called ...
1
vote
1answer
147 views

Zipping Sub-folders

I want to use 7-Zip to zip subfolders to another folder on the same drive. Each sub-folder has zillions of text files. I just want to zip subfolder as a whole via Powershell. I have a script but ...
2
votes
2answers
192 views

How safe is it to enable WinRM / PSRemoting on an internet-facing machine?

How safe is it to make the Remote Powershell (aka PSRemoting) endpoint of a production server accessible from the internet? We're not a bank or anything, but the server does hold sensitive corporate ...
0
votes
1answer
35 views

why is the powershell i can open from the run box not the same thing i can open from the start menu?

If I WinKey + R to open the run box and type powershell it works to some extent as it opens up a command line box. However, this windows doesn't behave like the powershell I can open from Start > ...
2
votes
1answer
168 views

How to remove substring in Powershell script

This script is almost what I need: $input_path = 'C:\Common' $output_file = 'C:\Common\extracted.txt' $regex = 'assets' Get-ChildItem -Path $input_path -Filter *.txt | Select-String -Pattern $regex ...
3
votes
4answers
453 views

How to open a second PowerShell console window from start screen?

I pressed Win and typed in "PowerShell". However, since there's already a PS console window open, the computer switched the focus to it, instead of, as I intended, open a new one. How can I open a ...
2
votes
1answer
94 views

Batch why <nul breaks my file

Well guys i am basically trying to get user input and type it on the batch I will be using backspace and enter so i cant use choice Thats why i am following this method To capture characters as ...
0
votes
1answer
33 views

Exchange Powershell Questions

Goal: Find all mailboxes which have not sent (or received possibly?) mail in the past 90 days. I've seen a few guides on powershell commands but I'm not positive I have the right order (Get-Mailbox | ...
1
vote
1answer
125 views

Can't Use Powershell Active Directory Cmdlets Even With RSAT Installed

A while back I wrote a simple .ps1 that let me look up the name of a user or the hostname of a computer and tell me which OU of my AD it resided in. I don't recall having any difficulty running the ...
2
votes
1answer
118 views

How to change date format in multiple text files in powershell?

Hello I have around 5000 text files (TXT) in one directory.Files are comma delimited. What I'm trying to do is to change date format (it is stored in first column of each file) from M/d/yyyy to ...
0
votes
2answers
411 views

Wsservice fails while attempting to fix Windows Store 8.1

My Metro Apps are not loading. They return: This App can't run Using this command in Powershell: powershell -ExecutionPolicy Unrestricted Add-AppxPackage -DisableDevelopmentMode -Register ...
-2
votes
1answer
87 views

Powershell script to find the Process and kill the process

I am a begineer in powershell script and trying to make a small powershell script to find the PID by searching the filename and if shows that multiple Pid then take the TOP one and kill that PID.I am ...
0
votes
1answer
88 views

Pinning cmd.exe to taskbar actually pins Visual Studio 2010 cmd console

Okay, so I've been having a very strange situation on my home computer. I'm writing a powershell script to do some basic stuff that I do on test rigs at work all the time for setup (create a shared ...
0
votes
2answers
33 views

Windows Explorer Recursive Copy Unknown File Types

I am attempting to move all files (several different types of files, potentially) from a single root directory and all nested folders within the root. There could several different levels of ...
1
vote
1answer
40 views

configure temporary account lockout using powershell

My Windows 8.1 laptop does not have gpedit.msc. I want to configure my laptop so that the account is locked for 15 mins if anyone enters the wrong password three times. I have found some web ...
0
votes
2answers
62 views

New to scripting and need help running powershell script to deploy software. (powershell blocked execution) [closed]

The following script was written for me. My problem is that when our remote deployment system executes the script, Powershell on the local machine will not run the script. It has no problem running ...
1
vote
0answers
387 views

Line wrapping in Powershell ISE Console?

I sometimes write long lines of code as I am playing with things in the PowerShell ISE (v4 on Windows 8.1). I find its console window helpful in many ways, but I'm unable to figure out how to make it ...
0
votes
1answer
214 views

Turn ON display with a batch or powershell

We have a computer connected to a large vizio flat screen that displays secure information and it is always on. I have a script running with task scheduler to shut off only the display at a certain ...
0
votes
0answers
138 views

Can't click application with Powershell

I am trying to automate clicks on a software for which I do not have the source ... So I do not have a choice. When I execute my code, the mouse moves well, but the clicks do not perform on my ...
0
votes
2answers
61 views

DOS batch variable expansion to give Last Access Time

I'm trying to use a FOR /R loop to iterate over some particularly long-named folders (greater than 260 characters in length, hence the need to use \?\ ) I need out of the loop, the fully qualified ...
0
votes
0answers
97 views

How do I get Bits transfer to download a file for me?

I've been trying to get Windows PowerShell on Windows 7 to download files for me using Bits transfer. The file I was downloading was Marvinbeans 15.1.9.0 from ...
3
votes
1answer
65 views

Bash “command” equivalent in PowerShell

Is there a "command" equivalent of Bash in PowerShell? I used to over-ride certain command in Bash like this: function npm(){ command npm --no-color $@ } I'd like to do the same in PowerShell, ...
1
vote
1answer
32 views

powershell directory prefixes

What do you call the prefix portion in powershell directory paths? Like for certificates, you can do: cd cert:/path/to/certificate or for registries, you can do: cd HKCU:/path/to/registry/key ...
0
votes
1answer
3k views

How to add Active Directory module in PowerShell in Windows 8?

I use Windows 8.1 and I try use Import-Module ActiveDirectory, but I get the following error: PS C:\Windows\system32> Import-Module ActiveDirectory Import-Module : No se cargó el módulo ...
0
votes
1answer
56 views

Make Batch file to add special tags at the front of video files at one folder

I always make download for learning tutorials videos , Some times I don't remember where I can find those videos because they are too many , so I decide to make tags to those file and put them in ...
1
vote
1answer
136 views

Powershell Window Tiny at High Resolution

I have recently bought a Lenovo Yoga 3 ultrabook which has a screen resolution of 3200 x 1800. My cmd window and Powershell window are tiny at this resolution. I have changed the size of the normal ...
0
votes
0answers
136 views

“Change PC Settings” link doesn't work in Windows 8.1

Okay, Today I've upgraded from Windows 8 to Windows 8.1 through Store, the upgrade finished successfully and installed as well, I tried to open the PC settings from the Charms Bar, when I pressed on ...
0
votes
1answer
204 views

What is the difference between running @powershell and powershell (any command with @ at the front)?

Just installed Chocolatey and in their installation instructions they have @powershell -NoProfile -ExecutionPolicy unrestricted...... I tried to run @cls in my console and it worked too. It's ...
0
votes
1answer
720 views

Running batch file on remote machine (VM) using PowerShell

Quick question, have searched for awhile but can't find answer anywhere. Some background: I have a local machine and remote machine (Virtual Machine) that I am connecting through RDP. I have a batch ...
0
votes
1answer
380 views

Remove cached credentials for MS Onedrive using a script

I have a need to be able to remove onedrive cached credentials from local machines from the windows credential manager using a script The reason - When a user is prompted to change their O365 password ...
0
votes
1answer
22 views

Writing a script for a multi network student lab to change networks

I work in a university/college and having a problem in one of the labs. At the moment we have a few programs that pull their licences from a licence server. This licence server has no internet ...
1
vote
1answer
110 views

How do you change the default powershell font style?

I'm changing both Powershell and the Windows Command Prompt to use Ubuntu Mono has the default font. After installing the Ubuntu Mono Font Family and modifying the registry, both consoles pick up ...
0
votes
1answer
42 views

Is there a way to distinguish between 2 optical drives when opening and closing with PowerShell?

Is there a way to distinguish between my 2 disk drives when executing- $cd = Add-Type -memberDefinition @" [DllImport("winmm.dll", CharSet = CharSet.Ansi)] public static extern int ...
1
vote
1answer
52 views

Find out the depth of path in PowerShell

For any location gotten by the Get-Location cmdlet, if I have a path like this: C:\Top\Middle\Bottom I would say it's 3 levels deep. If I have: C:\ I would say it's the 0 level. It could be 0 ...
1
vote
1answer
184 views

Windows Activation Powershell Script

I'm looking for a method to automate activation Windows 7 machines through PowerShell. We get approximately 50 computers a month and it's slowly increasing, so manual activation is no longer possible ...
0
votes
2answers
70 views

PowerShell with Tabs Window Management

Is there a way to run one powershell window and have multiple tabs in this window that you can jump between without have several powershell windows open?
1
vote
0answers
149 views

Set-AzureStorageAccount - GeoReplicationEnabled parameter will be deprecated in a future release

I get the following warning in powershell for this command: Set-AzureStorageAccount -StorageAccountName $storageAccount -GeoReplicationEnabled $false WARNING: GeoReplicationEnabled parameter ...
0
votes
1answer
1k views

Sysprep.exe fatal error, and can't delete metro app in windows 8 to get it working

Today I used sysprep.exe to rebuild my windows image. But it always said "a fatal error occurred while trying sysprep". Then I went to check setupact.log file , it shows like this I followed this ...
1
vote
1answer
81 views

Download files from web, unknown name of file

I need to download 10-15 programas every week, and looking how to automate the process. It's easy when I know exactly the name of .exe file; but what about the case when I dont? For example, lets ...
0
votes
1answer
168 views

I installed a python package on Windows using pip. Why can't I call it from the command line?

In Powershell I installed boto-rsync using pip: PS> pip install boto-rsync That installed boto-rsync in C:\python27\Scripts as 'boto-rsync' as expected. I have C:\python27\Scripts in the path ...