An interactive shell, scripting and programming language, and surrounding environment from Microsoft. Commonly used by system administrators managing Microsoft software (including Windows, Exchange, SharePoint, and cloud services Azure and Office 365), PowerShell is included by default with Windows, ...

learn more… | top users | synonyms (1)

1
vote
0answers
24 views

Disks added to storage spaces are not picked up by virtual disk created by powershell

A time ago i had to configure a W2012 R2 essentials server with storage spaces and 2 virtual disks. As the real disk count and the disks itself where not final at that time, i had to resort to the ...
3
votes
1answer
2k views

Get-ItemProperty : Cannot find path 'HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.SqlServer.Management.PowerShell.sqlps'

I've tried reinstalling SQL Server 2014 and I'm still getting the following error message when trying to import-module sqlps. The same registry key exists, but is appended with 120. I'm able to use ...
1
vote
1answer
1k views

Obtain device driver version and associated GUID using PowerShell?

Right now, I am getting two separate objects A Win32_NetworkAdapter WMI object A Win32_PnpSignedDriver WMI object In my previous scripts, I've made sure I was calling separate objects, and ...
0
votes
0answers
26 views

How to retrieve data from powershell runspace job

Trying to multithread some of my scripts that take a while to run. One example is getting the last login for a user. It checks all of our DC's and then returns the most recent time. We have quite a ...
1
vote
2answers
1k views

New-MoveRequest - How to assign -TargetDatabase dynamically

I am in progress to migrate (approximately) 5000 mail-objects and I need a way /script /command that will allow me to utilize the New-MoveRequest CMD-Let in combination with the possibility to ...
2
votes
1answer
19 views

Why can't DSC find a resource that's installed?

I'm trying to apply a DSC configuration that uses a resource from a module that is installed. However, when I run Start-DscConfiguration, I get this error: The PowerShell DSC resource ******** ...
0
votes
2answers
31 views

Check out how many users or computers are authenticated in a given Domain Controller

I found a script to check out how many users or computers are authenticated in a given Domain Controller. The Script can be found here: https://gallery.technet.microsoft.com/scriptcenter/Check-out-...
8
votes
2answers
21k views

Server 2012 Server Core powershell not installed

In server core, after a restart powershell was all of a sudden not installed, what do I do to reinstall it? I do not have remote administration set up yet so I cannot use that to re-install it. '...
2
votes
3answers
506 views

Can you use Powershell Remotely to reset AD passwords for Server 2008

Young intern here with a powershell project. My goal is to use a domain computer with administrative [domain] rights to reset user passwords in AD from our server. In order to do so, I have installed ...
0
votes
2answers
2k views

PowerShell - Add multiple strings to the same element in an array

So I have a array that I need to search through line by line and divide up by interfaces. My code loops through this file line by line. I want to split up the interfaces by the "!" character and add ...
-2
votes
0answers
22 views

Monitoring Windows RT/PowerShell commands being run against a system [on hold]

If there's some theoretical deployment process that has PowerShell scripts running against a remote system and you need to debug it, is there a way to check whether it's still running or even merely ...
-1
votes
0answers
11 views

Windows RT Command Timeout

I've recently observed PowerShell commands being run against a remote system but then blocking and not returning when the Stop-Service failed. This kept the release-process open indefinitely. Is ...
-1
votes
0answers
12 views

powershell error in dfs commandlets while taking ps-session

New-DfsnFolder : Access to a CIM resource was not available to the client.AtD:\scripts\IAM\sharefoldermanagement\AddingShareToDFS\AddingShareToDFS.ps1:8char:5+ $a=New-DfsnFolder -Path $path -...
0
votes
0answers
22 views

Palo Alto Globalprotect - connect via cmd

Scenario: Windows box having the Palo Alto Globalprotect vpn client installed. Is it possible to use commandline or powershell to connect the vpn client to a remote host? I know this is possible ...
4
votes
1answer
2k views

Use the DFSR Module on a Windows 2012 R2 Server Core

I have a standard Windows 2012 R2 box setup with server core. I have the file server roles installed along with DFSR. I want to use the powershell tools like Get-DfsrState and other Get-Dfsr* to ...
0
votes
1answer
8k views

How to get cluster information remotely via Powershell?

I've been trying to find a good way to gather various pieces of a windows cluster setup remotely, preferably via WMI, as we are not yet at a point where Powershell remoting is implemented (and I know ...
1
vote
1answer
2k views

Exception Enumerating SQL Server Instances with SMO WMI ManagedComputer

I'm trying to use the SMO WMI API/objects in PowerShell 2.0 on Windows 7 with SQL Server 2008 R2 installed to get a list of SQL Server instances on the local computer using the Managed Comuter object. ...
0
votes
0answers
45 views

Can't initialize VM's on HyperV Windows Server 2012

I'm really stuck with this and I can't understand why I sunddendly can't make ANY VM to start succesfully in my system. I had just one VM, and it was working perfectly, then for some reasons I booted ...
11
votes
5answers
2k views

Windows Powershell Vim Keybindings

Is there a way to get vim keybindings in powershell as you would in bash or zsh with a command like set -o vi
2
votes
1answer
2k views

Identifying mailboxes with corruption Exchange 2013

We're preparing to rid ourselves of Exchange on-premise and are migrating from an outsourced hosting provider to go to Office 365. We're running a fully patched version of Exchange 2013, atop Server ...
1
vote
3answers
14k views

Using Powershell's Invoke-command to install .exe on remote computer

I have an .exe I would like to install on a large farm of Windows Server 2008 computers. I am attempting to use Powershell remoting. I have this command which works locally: invoke-command {& "...
0
votes
0answers
33 views

Disable touch feedback from command line

I am developing interactive installations using Windows 8 as operating system. A thing I always need to do is turn off the visual feedback you receive when touching the screen (the line that follows ...
1
vote
1answer
20 views

How to use -Identity <mailbox>

The full command I am trying to run is: Start-ManagedFolderAssistant -Identity <mailbox> I interpreted that as: Start-ManagedFolderAssistant -Identity jack Is that correct? Should it be ...
0
votes
0answers
18 views

Unbind virtual NIC to a physical NIC

In Hyper-V Switch Manager from a remote machine I configured a NIC to be External and with the option for Allow management operating system to share this network adapter. The process failed mid way ...
2
votes
1answer
100 views

A non-recoverable error occurred during a database lookup

Short version: Why does Test-Connection report "A non-recoverable error occurred during a database lookup" for an offline host on a different subnet? I'm using PowerShell to ping a remote host with ...
0
votes
2answers
2k views

PowerShell script can't open a file when run as a scheduled task

My PowerShell (2.0) script has the following code snippet: $fileName = "c:\reports\1.xlsx" $xl = new-object -comobject excel.application $xlFormat = [Microsoft.Office.Interop.excel.XlFileFormat]::...
-3
votes
1answer
54 views

script to know application pool,bindings [closed]

Do we have any powershell command or powershell script to get the website details as website name, application pools associated to,.Net version,bindings mapped to website. do we have a single line ...
4
votes
2answers
2k views

Exchange's New-MailboxExportRequest behaves strangely with DateTime parameters to ContentFilter

I am attempting to extract a certain date-range of emails from a mailbox into a PST, but using a DateTime parameter for ContentFilter doesn't seem to work as expected. This should export everything ...
0
votes
1answer
56 views

Renewing public dynamic IP via Powershell ?- Azure Resource Manager

i need your help! I'm trying to renew a dynamic IP assigned to a VM, but i want to figure it out if there's some possibility to accomplish this via powershell cmdlets without being in the need of ...
-1
votes
0answers
22 views

Powershell add csv list of users to group in trusted domain

Need to import list of users into a group in a trusted domain. This is all internal and I have a one way trust (DomainB trusts DomainA). I have a list of users from DomainA in a CSV that I need to ...
0
votes
0answers
19 views

PSSession Access Denied Error

I try connect to from the machine psttest01 to the machine psttest02 with PSSession and certificates as authentication. For that I used this command: Enter-PSSession -ComputerName psttest02 -...
1
vote
1answer
39 views

WMI query ran in a Powershell console yields less results in 32 bits mode than 64 bits mode

This query gwmi -Class Win32_PerfFormattedData_NETFramework_NETCLRMemory gives fewer results if I run it in a 32 bits PowerShell console than in a 64 bits one. It looks like background processes, ...
1
vote
1answer
32 views

Get all emails sent to particular email address and not the mailbox (alias')

I'd like to see all emails sent to a particular email address rather than the full mailbox with all alias'. e.g. if bob@example.com is the primary email address and bob@example2.com is an alias, i'd ...
0
votes
0answers
14 views

Stop Windows Backup from making Deduplication Exclusion for backup drive

With Windows Server Backup after every backup, the server puts an exclusion in the Deduplication list for the backup folder. Is there a way to stop this behavior? If not, is there a way to get ...
0
votes
0answers
16 views

Enable-VMResourceMetering sometimes fails in Hyper-V 2012 R2

I am trying to loop through and enable metering on all virtual machines that already do not have it enabled. It works most of the time but when it does not, I get the following unhelpful error message ...
0
votes
1answer
24 views

Invoke-DscResource against a resource without a module

On the current version of WMF5, I try and invoke a DSC resource using Invoke-DSCResource like so: $destinationPath="$env:SystemDrive\DirectAccess.txt" $fileContents="This file is create by Invoke-...
3
votes
3answers
4k views

Transfer files via Powershell Remoting (like scp in linux)

During the creation of a few powershell-based deployment scripts, I sorely missed an easy way to quickly transfer a file to another server (over the internet) via Powershell Remoting, something like ...
1
vote
2answers
61 views

Azure Powershell - Change Directory

When I login to the new Azure Portal I see a drop-down at the top right that lets me select a "Directory" from a list of 2. When I login to azure using powershell cmdlet "Login-AzureRmAccount" I am ...
2
votes
2answers
83 views

How can I use PowerShell to enable NTFS compression, in place, on log files older than x days?

I have an application server, running Windows 2012 R2, which generates a high volume of log files, to the point that it runs the application volume out of free space on a semi-regular basis. Due to ...
1
vote
0answers
15 views

dsc local configuration manager email me whenever change occurs

I'm running DSC with ConfigurationMode set to "ApplyAndAutoCorrect" It works fine as it is fixing any issues withing 15 minutes which is default. I would like to get notified by any means whenever ...
1
vote
1answer
934 views

Invalid namespace “rootvirtualization” on Hyper-V 2012

Running the following command on a fresh Hyper-V 2012 server: get-wmiobject -namespace “rootvirtualization” -Query “select * from Msvm_ConcreteJob” produces this errorerror: Get-WmiObject : ...
0
votes
1answer
37 views

Powershell: Executing Base64 commands returns error?

I need help with a simple test case of executing a CLI command through PowerShell which has already been encoded in Base64. Suppose Get-ChildItem has been converted in advance to Base64 string ...
0
votes
1answer
49 views

Azurerm powershell Cannot bind parameter and Cannot convert the value

even I can see the virtual network still can not get the specific virtual network subnet info from Azure powershell1.4.0. PS C:\Users\mwang> Get-AzureRmVirtualNetwork |more |Select-String name |more ...
3
votes
1answer
97 views

How can I force a client to update its IP address in SCCM?

I am testing some networking issues with a machine that i need to move through the organization, this make the machine to change its ip. SCCM need to update this ip (highlighted in the picture) in ...
-1
votes
1answer
38 views

Powershell script to take and delete snapshots

Im new to powershell and i want to create a script to take a snapshot of all the running vm's and delete the snapshots that have more than lest say 5 days. What i have is this: $Time = 5 $VMs = Get-...
0
votes
1answer
33 views

WinRM-Service is running but can't be reached

I have a virtual testing environment for developing scripts. As .NET isn't capable of all the possibilities PowerShell offers I use Remote PowerShell Runspaces. My problem is now, that I can't reach ...
0
votes
1answer
16 views

Create a backup on a remote share using Powershell

I have a backup script that is supposed to target a specific local folder and backup the folder to a remote shared folder on another server. When I run my script, Powershell prompts me with the ...
0
votes
1answer
22 views

set the screenbuffersize of powershell console using cmd

For powershell version: 2.0 and 4.0 Is there a command used set the screenbuffersize of powershell console? I need to set the property of powershell console, not default size. I have tried the below ...
0
votes
1answer
67 views

Powershell Abbreviations?

I have a question about how PS abbreviates various commands, particularly when initializing a PS session. Let's assume we're starting at a Windows DOS Prompt: C:\> powershell -exec bypass I ...
0
votes
1answer
42 views

Check `Restore on AC/Power Loss` from CMD/Powershell on windows 10

I've set the Restore on AC/Power Loss from the windows Bios menu on computer startup for a few Windows machines. How can someone confirm (remotely) that I have done that, is there a way to do this ...