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
0answers
184 views

Powershell: Windows patching on multiple servers

We have about 1000+ servers and they patch by WSUS. In WSUS we assigned the patch and after that we login to the servers and download n Install the patches. Once it done we restart the machine as per ...
0
votes
0answers
26 views

How can I disable/enable multiple hardware components with a single command?

I am a web developer/designer during the day, but at night I play DJ gigs. For music, I need several hardware components disabled. Then, after the gig, I reenable all of the hardware. Each of these ...
0
votes
0answers
28 views

Login a generic user via PowerShell

I would like to write a script, which has the purpose to login a generic user to a remote computer. I would like to do this via PowerShell and without any external tools, except any of the ...
0
votes
0answers
49 views

Powershell possible to give input to underlying script

I am sorry I could not think of a better title. My problem is I have a PowerShell script which calls a git command (git credential-wincred store) to store credentials to connect to a git repository. ...
0
votes
0answers
106 views

Migrate users from old print server to new print server

I am trying to script out a method of moving users from our old 2003 server to our new 2012 server. The clients are using Windows 7 and 8.1. The trouble is I am new to scripting, and googling hasn't ...
0
votes
0answers
27 views

Why does my PowerShell belief it's a Cygwin terminal?

Lately I discovered that colorama* does not work as intended. It does not convert ANSI escape sequences into WinAPI calls to change the PoSh console text colors. I noticed that it works correct in an ...
0
votes
0answers
39 views

Automate Outlook Settings

When I move between work computers (not by choice), there's a few Outlook 2013 settings I always end configuring. Is there a way to automate this? The settings I change: Mark items as read after 0 ...
0
votes
0answers
40 views

Is it possible to run a Citrix published program through Powershell?

I have been trying to create a way of making powershell execute SSH communication with a remote server but I don't have a way of getting the connection information (domain/ip). The only way I can ...
0
votes
0answers
75 views

Get-AppxPackage in vbscript

I need to run a vbscript to be able to list all of the packages installed. I know this functionality exists in PowerShell is there a way to see app packages installed on a computer in vbscript?
0
votes
0answers
181 views

Task Scheduler don't run task action script

head to Plan C anyway How to setup a task scheduler to run, effectively, a .bat which runs a .ps1 script (closes firefox, wait 3 seconds and enter suspend mode) or directly run the .ps1 whichever ...
0
votes
0answers
49 views

Convert vmware .ovf to hyper-v

Can you please tell me if there is any script that I can do(preferably in python or powersehll), for taking vmware .ovf(+his vmdk) and import it in hyper-v machine? I don't want to convert with third ...
0
votes
0answers
106 views

Can the PowerCli command “Get-VM” indicate if a VM is a SRM replica or not

I am working on powercli 5.5 release 1e and i run the following command to get a list of vm under a hypervisor server:- Get-VM now i got many useful info such as :- > powerState Version ...
0
votes
0answers
161 views

While run the powershell script on Chef server getting : Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available

I have Created powershell script and try to run the script on chef server with .rb extension.After run the script chef throwing error message : Backup-backup,Fail,Windows PowerShell is in ...
0
votes
0answers
286 views

How to create new Virtual Desktops in a script to launch multiple applications in multiple desktops in Windows 10?

In the case where hibernation is not possible, after turn off and turn on the computer would be useful have a script to reconfigure the system as it was before: How to write a script to launch ...
0
votes
0answers
32 views

Change gpedit option directly on registery

On this post i have found a solution to change gpedit option directly on registery : Is there a PowerShell Command that can change the gpedit setting to Restrict Remote Desktop users to a single ...
0
votes
0answers
18 views

Can you pass commands to a VM from the host server?

I have written a batch file to set the IP address of a host server and the two virtual machines running on it. At the moment you have to copy the script onto each machine and run it which isn't what I ...
0
votes
0answers
21 views

Is there a way to assign an alias to the Remote-Item Cmdlet's -Force parameter?

I would like to use the Remove-Item in a similar manner to how it is used in Unix/Linux: PS> rm -r -f <the_directory> However, this syntax produces an error: Remove-Item : Parameter ...
0
votes
0answers
52 views

Cannot install Certification Authority Web Enrollment role WS 2012

I have just been trying to get a CA going on my home server so I can start issuing myself certificates to use on internal stuff and to secure the connection to my mail server, but every time I try to ...
0
votes
0answers
80 views

Can't clear the screen when I run docker on Windows Command Prompt

I am using docker on windows with an Ubuntu Image. Everything is just fine on docker itself, but when I run one of those images, whenever I try to clean the screen, the cursor moves to the fist line ...
0
votes
0answers
101 views

Creating Symlinks from a iSCSI-Volume to a Fileserver

my fileserver is near capacity limit (using Windows 2012) und full of files, that hasn't been used for years, but still need to be kept for researches in the future. Furthermore the unused and ...
0
votes
0answers
35 views

Rules for accessing perf counters in perfmon?

I wrote a suite of powershell scripts using the .NET API to create, connect, and write to performance counters in perfmon. The whole setup is kind of complicated and probably not relevant to this ...
0
votes
0answers
71 views

Driver update script

Is there a way to download latest drivers for all devices connected? I've noticed that Windows Update does not automatically update the devices to the latest version so I have to manually go through ...
0
votes
0answers
931 views

Proper Powershell 2.0 installation on Linux with wine 1.7.29

Despite the bad rating on WineHQ I attempted to install Powershell 2.0 using wine 1.7 on Debian Jessie, and after a registry "fix", it runs without the previous startup errors. I had followed the ...
0
votes
0answers
54 views

Terminal Issues running powershell 2.0 under wine 1.7.29 on current Debian Jessie

When running the powershell executable using wine 1.7 on my Debian Jessie Linux, I am facing some (terminal) issues, that seriously hamper usability as an interactive shell. In order of importance: ...
0
votes
0answers
36 views

Powershell Variable value from Parameter

I am trying to automate SVN branch and tag creation and started writing a script but stuck and looking for help. I need to pass a parameter for application so that it can identify the path depending ...
0
votes
0answers
63 views

Why is my command prompt in windows a total failure?

Okay, so I've been trying off and on to use the command prompt over the past month in windows 7, but nothing will work. Examples: Could not use assoc command to change all my files from word ...
0
votes
0answers
42 views

Create new google analytics property using PowerShell

Is there a way I can create a new Google Analytics property using PowerShell? The only API I can see is this REST API ... if anyone has any relevant examples that would be great. I guess I can use ...
0
votes
0answers
25 views

How does Set-WinAcceptLanguageFromLanguageListOptOut prevent changes to the language list from reestablish the registry key?

According to Microsoft the powershell command Set-WinAcceptLanguageFromLanguageListOptOut 1 sets HKEY_CURRENT_USER\Control Panel\International\User Profile\HttpAcceptLanguageOptOut to 1 and prevents ...
0
votes
0answers
627 views

How to install a Windows Store app properly using powershell?

I have tried to install Windows Store App using PS command: Add-AppxPackage -register "C:\Program Files\WindowsApps\Microsoft.WindowsStore_2015.9.9.0_x64__8wekyb3d8bbwe\AppxManifest.xml" -...
0
votes
0answers
48 views

Why WinRM service has been stopped when an exe file is moved to remote machine using powershell

Intially the exe has been moved to remote machines using this code $session = New-PSSession -ComputerName $remoteip1 -Credential $cred $contents = [IO.File]::ReadAllBytes($execpath) Invoke-Command -...
0
votes
0answers
20 views

Invoke-History seems to want to also invoke the output of the recalled command

I have the following function in my $profile: function With-Env ( [string[]]$vars, [Parameter(Position=2)] [scriptblock]$f ) { Push-EnvironmentBlock Foreach ($...
0
votes
0answers
392 views

Troubleshooting Windows 10 Default Apps+Start Menu

I was attempting to reinstall the Windows 10 Mail & Calendar app, using the powershell command: Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage This successfully removed the app, ...
0
votes
0answers
30 views

format partition when windows is coming up?

Does it possible to format automatically "unallocated partition" and assign a drive letter when windows is coming up first time? Hope this is possible using powershell on windows startup. EDIT I have ...
0
votes
0answers
70 views

PowerShell FunctionDefinitions

I have a requirement to create a PowerShell constrained endpoint and I am trying to include custom functions inside the pssc file. One such function is a wrapper to Restart-Computer that should take ...
0
votes
0answers
117 views

How do I supress the vmware tools reboot when doing an unattended installation?

I'm setting up a VMware machine factory using packer for my own development. I'm trying to install the VMware guest tools in the middle of this, but every time I try, the system reboots. The factory ...
0
votes
0answers
107 views

Microsoft Diagnostic Tool via C# remotely

I need an efficient way to execute the Microsoft Diagnostic Tool Troubleshooting Pack via C# on a remote machine. The criteria for the Troubleshooter is: Run elevated (admin). Run silent. Run ...
0
votes
0answers
198 views

File share and their size - Powershell script

So I have gotten a little further, I can now scan a folder if I type it in but scripts aren't for manual labor. I want to be able to use the command below to pull the share automatically for me. Get-...
0
votes
0answers
66 views

SETX not working when run as service

I have a service which invokes a batch file which runs a Powershell script which calls SETX to update an environment variable. The environment variable gets changed, but the change apparently isn't ...
0
votes
0answers
130 views

Powershell code to remove old ActiveSync devices

My PS skills are limited and need a hand. When I run GET-ACTIVESYNCDEVICESTATISTICS -MAILBOX (USER) | FORMAT-LIST IDENTITY,DEVICEID,LASTSUCCESSSYNC I get the expected output on the run. My issue ...
0
votes
0answers
100 views

Connect to Oracle database by powershell

It sound stupid but i want to know how we can connect to oracle database remotly by powershell. I know we can connect by using ODP.net but i am looking for all possible option. I dig a lot on google ...
0
votes
0answers
88 views

Starting a Program with Powershell Remoting

Using Windows Powershell, this opens notepad. notepad.exe But this, which is meant to remote into a virtual machine and open notepad there, does not. Instead, the process starts but the GUI is ...
0
votes
0answers
86 views

how to change name of “home networking connection” for shared connection with Powershell (for hotspot)

I am using the powershell script here http://superuser.com/a/649183/192653to in order to activate a shared connection on my "Wireless Network Connection". That works, however I would also like to set ...
0
votes
0answers
141 views

Audit NTFS folder permissions without accessing file content

Tasked with writing a Powershell script that audits file access permissions on an NTFS NAS drive. The script runs a recursive gci | get-acl to store the initial access permissions (file name + who ...
0
votes
0answers
141 views

Windows 8.1 + embeddable release of Python 3.5 = “Python has stopped working” error

So I downloaded Python 3.5.0b4 - Windows x86-64 embeddable zip file and placed it into %USERPROFILE%\Documents\python. I then opened up PowerShell, cd'd into that directory and typed ./python and got ...
0
votes
0answers
39 views

Scheduled tasks inconsistently running

I'm trying to run a PowerShell command for a persistent session in Metasploit. It downloads and executes shellcode on system startup. I've gotten it to work when I'm on the computer with the GUI, ...
0
votes
0answers
1k views

Full server backup using powershell script

I am using the following script from the microsoft website for create a image backup of my servers. The problem is that I have an external hard disk on one of my servers and the backup script always ...
0
votes
0answers
303 views

What causes ‘Has Stopped Working’ CLR20r3 errors for PowerShell?

My question is specific to the CLR20r3 error ONLY, for PowerShell instances ONLY. I can't seem to pin down which thread ended up causing this, but I'm going to open one of my applications that's ...
0
votes
0answers
40 views

Is it possible to initiate SCCM 2007 updates from the command line or powershell on client's computer?

Current Process: 1. RDP to client's machine 2. Install updates that are advertised in User Interface 3. Reboot Issues: 1. We have to remote into one machine at a time, which is a nightmare. 2. We ...
0
votes
0answers
35 views

Stop PowerShell from sharing command history between simultaneous instances

Let's say I have two PowerShell instances open simultaneously. If I type a command in one of those instances, hit enter, switch to the other one and hit "up", the command I previously typed appears ...
0
votes
0answers
287 views

PowerShell script to monitor files in multiple folders

Can anyone help me with the PowerShell script below to monitor files in multiple folders (like D:\test1 and D:\test2 and D:\Test3)? SET FOLDER TO WATCH + FILES TO WATCH + SUBFOLDERS YES/NO $watcher = ...