The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
2answers
47 views

Mount a Linux VMDK on Windows 2012 R2

I would like to mount a Linux VHD (ext3) file on Windows 2012 R2. So far, I have been using PowerShell to deploy Windows VMs and mount them locally to inject the unattend.xml file. I would like to ...
0
votes
0answers
36 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
30 views

“kill -3” equivalent in powershell?

I'm trying to a get a Java Program running on Windows to perform a (java) Thread Dump; on Linux I would use: kill -3 <pid> Is there a Powershell equivalent of this ? I tried: debug-process -...
0
votes
0answers
38 views

“This Update is not applicable to your system”

When trying to install Windows Management Framework 5 on Windows 8.1 I'm getting this error: "This Update is not applicable to your system". According to this article it's due to a dependency on PS 4 ...
0
votes
1answer
204 views

How to create a PowerShell graphical interface?

I'm working on a project using PowerShell I would like to know what is the best way to create a PowerShell GUI?
0
votes
0answers
29 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
60 views

365 Merge Mailbox - Off Premise Powershell Commands

I am running an Off Premise 365 with approximately 3,000 users across 25 domains. I need to automate the merging of mailboxes, preferable utilizing the ability to merge into a sub-folder of the ...
0
votes
0answers
41 views

Unable to kill a process

With admin rights and Powershell, I want to kill a nasty process. PS D:\_prj> Get-Process someapp* | Stop-Process -Force (or without -Force). That works in 99% of cases. Unfortunately, sometimes ...
0
votes
1answer
67 views

Syncronize Hyper-V - Dual Boot Windows 10/Server 2012R2

On my PC I dual boot between Windows 10 and Server 2012R2. I keep the drive mappings exactly the same only flopping the C: and the Z: drive. I have Hyper-V role installed on both installations. I have ...
0
votes
1answer
59 views

Tail pattern with context in Powershell

If I tail a log like this: gc xxx.log -last 1 -wait | sls -patt 'Exception' -simple | % {write $_.Context.PreContext $_.Line $_.Context.PostContext} it works as expected spitting out lines ...
0
votes
0answers
26 views

PS compare-object ¿ignoring? output of nested get-childitem

When I run: if((compare-object (get-childitem $SourceDirectory -recurse) (get-childitem $DestinationDirectory -recurse)) -eq $null) { write-host "Compare successful" } else { write-host "Compare ...
0
votes
0answers
28 views

Find duplicate files and remove

Please help me build a power shell script. My file names are like DB_name_yyyymmddhhmmssss.bak . I have multiple files for the same day. I want keep the last backup and delete the rest. I have folder ...
0
votes
1answer
56 views

Powershell 4.0 script to recycle MS Outlook in Win 2012 R2 Server?

I have a Win 2012 R2 Server that runs unattended with apps dependent on MS Outlook 2013 running. I would like to create a daily scheduled PowerShell script to gently close Outlook, create a backup of ...
2
votes
2answers
507 views

Using Advanced Parameter Sets in a Function with Multiple Unique Switches

I am using Powershell 4.0. I am attempting to write a cmdlet and in this cmdlet I would like to use Advanced Parameter sets to have certain options available based on what parameter(s) is/are chosen. ...
-1
votes
1answer
72 views

Regedit Don't open

I modified Registry key ProgramFilesDir to install more applications in External HDD but after reboot I can't open any application installed in my Pc , or any utilities of windows like Regedit / ...
0
votes
1answer
227 views

why remote powershell session dose not need password

why remote PowerShell session dose not need username and password? this is very terrible because I feel anybody can connect remotely to my server. I use negotiate authentication method and server ...
0
votes
0answers
133 views

ping results are opened in new window when using powershell 4.0

Whenever I ping any IP using PowerShell, a new window pops up which displays the output, see the screenshot below. Please help in restoring to default i.e. ping results shown in the same PowerShell ...
1
vote
0answers
602 views

PowerShell Remote Defrag

I have the following code that works fine on my Windows 7 computer: $Defrag = Get-WmiObject Win32_Volume -Filter "DriveLetter='c:'" -ComputerName "SRLVHOMAPP01" | Invoke-WmiMethod -Name Defrag But ...
2
votes
1answer
3k views

Test network ports faster with PowerShell

In Windows 8.1, the Test-NetConnection cmdlet is useful for checking the state of a network port on a remote system. However, it can be unnecessarily slow sometimes. I'd like to know if there's some ...
1
vote
1answer
2k views

Can't install PowerShell 4.0

I'm trying to install PowerShell 4.0 on a Windows 2008R2 server Installed Windows6.1-KB2819745-x64-MultiPkg.msu with no errors or warning But when I run up PowerShell and check the $host.version, it'...
0
votes
1answer
156 views

Can't get powershell to return where results from GCI using ACL

I'm trying to get Powershell to list files in a directory that are older than a certain date and match a certain user. I've got the below script so far which gives me all the files older than a ...
4
votes
2answers
692 views

Get-ChildItem | tree gives me a wierdly formatted tree

The following input: PS STG:\> Get-ChildItem | tree Gives me Folder PATH listing for volume Data Volume serial number is 6576-C540 D:. ÃÄÄÄAPK ÃÄÄÄAssets ³ ÃÄÄÄAnimations ³ ³ ...
5
votes
2answers
705 views

Why does running PowerShell change my console font?

I have a strange problem on my laptop - when I run Powershell within an existing console window, the font choice for the window changes. For example, this is cmd.exe immediately after opening the ...
1
vote
1answer
1k views

Invoke-Sqlcmd not working after PowerShell 4 install

I installed PowerShell 4 yesterday and ever since then, I get the error "The term 'Invoke-Sqlcmd' is not recognized as the name of a cmdlet, function". This has been working just fine for months ...
3
votes
2answers
1k views

Can the default PowerShell terminal keep a command history?

Is there a way to have PowerShell remember commands entered during the previous sessions? That is, after closing the window and opening it again, can PowerShell be setup to remember the commands?
164
votes
7answers
155k views

Native alternative to wget in Windows PowerShell?

I know I can download and install the aformentioned library (wget for Windows), but my question is this: In Windows PowerShell, is there a native alternative to wget? I need wget simply to retrieve ...