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

0
votes
1answer
23 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 ...
3
votes
3answers
9k views

Find AD users with specific AD attribute NOT null

I'm looking for a script/Powershell command that will list all AD users that have a value not NULL in the teletexterminalidentifier attribute, so they must have a value set. By default this attribute ...
0
votes
1answer
76 views

Running runas cmd in Powershell

I am a beginner and am trying to understand how to use the runas command in Windows Powershell. When I type the following command into Powershell: runas /user:\administrator cmd I am asked ...
0
votes
0answers
20 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
28 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
1answer
42 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
19 views

Storing secure strings during sysprep using Powershell

I have two Powershell scripts I'm building for a Windows 7 image. Prior to the image I run PRE-IMAGE.ps1, and it has a line like this in it: $JoinDomainPassword = Read-Host -Prompt "Please enter the ...
3
votes
1answer
37 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, ...
0
votes
0answers
21 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 ...
0
votes
1answer
43 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 ...
1
vote
1answer
17 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
23 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
24 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 ...
8
votes
7answers
8k views

Powershell font too small on Windows 8.1 - how to adjust?

Question: On my Windows 8.1 machine, I need powershell to configure office web apps. When I start powershell, for a blink of a second, it shows as it should, but then it gets resized, and the font ...
0
votes
2answers
4k views

How to reset TCP/IP on Windows 8.1?

The following netsh command is not working on Windows 8.1. netsh int ipv4 reset It give “Access Denied” error and it is a VERY known issue, many people complaining about it all ove online forums. ...
0
votes
1answer
3k views

Call PowerShell script from Excel macro

I'm trying to call a PowerShell script from a macro in Excel. I have seen a number of examples along the lines of: retval = Shell("powershell ""C:\MyTest.ps1""", 1) When I try to use this, ...
1
vote
0answers
36 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 ...
1
vote
2answers
2k views

Download entire directory from a website using Powershell

I have been using the following command to pull back files from a web server and store them on my local machine: $client = New-Object System.Net.WebClient ...
0
votes
0answers
35 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
35 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
3answers
83 views

Use a variable inside a powershell string

I've got this currently on a single line in Powershell ISE Start-Process -filepath "C:\Powershell-Backup\disk2vhd.exe" -argumentlist 'C: \\Computer1\ServerBackups$\' + $ComputerName + '\' $JobTitle + ...
0
votes
1answer
17 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
30 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
0answers
20 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
24 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
0answers
42 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
1answer
32 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 ...
1
vote
1answer
54 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
2answers
31 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
1answer
6k views

Calling PowerShell functions in another scripts

I have a script with a number of functions (not just functions but also other code). I would like to create another script that uses one of the functions in the main script. Here is a sample of what ...
0
votes
0answers
14 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 ...
3
votes
1answer
4k views

What is the Start Screen Control in Windows 8.1 Enterprise

I have read different things on the new Windows 8.1 Enterprise RTM. One of the feature is the Start Screen Control. Start Screen Control: This feature allows you to control the look of the Start ...
0
votes
1answer
74 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
5k views

How to fix this WinRM error? (Set-WSManQuickConfig error)

On Windows XP Pro SP3, when I run Set-WSManQuickConfig (after agreeing to the new settings), I get this error: Set-WSManQuickConfig : <f:WSManFault ...
0
votes
1answer
149 views

Automatically retrieve a set of files from all domain computers

Is there any PowerShell script or piece of free or commercial utility software that could be run on a server on demand and which would copy a particular set of files from a particular location on all ...
3
votes
1answer
9k views

Office365 Exchange: Cannot open shared two calendars in Outlook

The problem: Outlook won't open the calendars on another user's mailbox and and a room mailbox, even when users have permission. Note: This problem is affecting more than one account on more than one ...
2
votes
2answers
2k views

How do you install .net4 on a Server 2008 r2 machine through psremoting in powershell?

I need to write a script that installs .net 4 remotely using powershell to a group of Server 2008 R2 machines. I based my script off of ...
0
votes
0answers
5 views

automate forefront identity manager 2010 with Power Shell

I have a VM running server 2012 with MS Forefront identity Manager 2010 R2 with the purpose of syncing our on prem AD to azur AD for office 365 Every 3 hours the service runs Active Directory ...
0
votes
1answer
15 views

Why does Console2 return the cursor at weird offsets?

Since I have insufficient reputation to post images, here is a screenshot where I type "quit" repeatedly within ghci. This behavior occurs when using both PowerShell and cmd.exe. The settings for ...
0
votes
2answers
56 views

How to get serial number of drive in storage pool

I have a storage pool in windows 8.1 and notice that whenever I boot the computer, it hangs for a long time in the detecting IDE drives during post. When it finally gets into windows, it shows one of ...
1
vote
2answers
2k views

Change to home directory in PowerShell

At the cmd command prompt, this command will take me to my home directory: cd %UserProfile% At the PowerShell command prompt, the same command produces this error: Set-Location : Cannot find path ...
3
votes
3answers
3k views

multitail for Windows cmd/powershell?

Is there a program like multitail but for Windows cmd.exe or powershell (not GUI)?
1
vote
2answers
425 views

Powershell queries

Is there a command line bash's !$ (match last word of previous command) any shortcut to delete previous word. Ex: cd D:\programs\scrap .<ctrl+backspace> deletes the word 'scrap' Replace ...
3
votes
2answers
2k views

grep in Powershell

What is the mos easy/comfortable way to use Powershells built-in functions to emulate grep like behaviour? In scripts I use something like this dir "*.filter" | foreach-object{ $actfile = $_ ...
0
votes
1answer
343 views

How do I renaming files in a batch with a counter?

I have 14,000 picture sorted into files by year and month but taken with multiple cameras. I want the file name to reflect the date the photo was taken. For example, all pictures taken on October ...
-2
votes
1answer
140 views

Powershell stopped working

I get the following message in my system 7, "powershell stopped working", very often. I tried a system scan and everything is ok. What is causing this message? How do I solve this?
2
votes
1answer
66 views

How to know the file history that has been transferred from pc to usb device or vice versa? [duplicate]

When I want to know that if any usb device that has been plugged in a pc recently, I write this command in Windows Powershell. Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Enum\USBSTOR\*\* | ...
0
votes
2answers
41 views

How can I remove all but last 10 characters in a group of files

How can I rename a group of files like admin_ball_126608454.gma another_thing_384157357.gma to ds_126608454.gma ds_384157357.gma
0
votes
1answer
37 views

Rename a file and add a part of the file as the suffix of the file [duplicate]

I have file names like: A_20141001_20141224.txt A_20141002_20141224.txt B_20141001_20141224.txt B_20141002_20141224.txt C_20141001_20141224.txt C_20141002_20141224.txt I want to rename them to: ...
-2
votes
1answer
42 views

PowerShell: find line but include proceeding and preceding line(s)

This is a conceptual question that I have only briefly thought through my head. I have idea how I might do it but it seems more complicated than I think I will make it out to be. A common need is for ...