PowerShell is Microsoft's new scripting language in 2006, and significantly upgraded in 2009. It allows interpreted scripts based on PowerShell cmdlets and .NET primitives.

learn more… | top users | synonyms (1)

0
votes
0answers
166 views

Amazon Powershell Write-S3Object can't resolve s3.amazonaws.com

Am seeing incredibly weird behavior for the Write-S3Object cmdlet provided by Amazon. I've got a backup script running Write-S3Object on my Windows Server 2008 R2 box. When I kick it off, it ...
4
votes
2answers
233 views

How do I identify a volume in WMI from a volume name reported in the event log?

I have a Windows 2008R2 server that's reporting the following error: The file system structure on the disk is corrupt and unusable. Please run the chkdsk utility on the volume ...
1
vote
3answers
169 views

How can I automate and run post installation commands in Azure Virtual Machines?

I need to deploy Azure hosts and configure them according to a pre-defined script once they are loaded. Is there any example, guidance,or tutorial on how to modify an Azure VM once the instance is ...
1
vote
3answers
354 views

Virtual Machines List from PowerShell vs PowerShell ISE and PowerGUI

I am confused to why I have different information based on where I try to retrieve it from. I have 3 Windows 2012 servers (G0, G1, and G2) running Hyper-V. The following situation is captured from one ...
1
vote
0answers
213 views

ftp get won't save on Windows Server

From a Windows Server 2012, using PoweShell, I connect to a remote device through ftp and run get to retrieve a file. The process goes through with no problems but the file doesn't get saved on to my ...
7
votes
2answers
866 views

How can a standard Windows user change their password from the command line?

On Windows Server 2008 R2, I have a standard (non-administrator) local user (not an Active Directory account, though the server is in a domain) who has access to the server only via PowerShell ...
1
vote
1answer
96 views

How to speed up applying impersonation rights changes?

I often add impersonation rights on various Windows Servers running Exchange Servers (2010, 2013) using PowerShell (New-ManagementRoleAssignment –Name:impersonationAssignmentName ...
3
votes
1answer
144 views

Update-Help on a Server-core behind a proxy

I'm struggling to update the help on a server-core box behind a proxy. I have seen that it was possible to set winhttp proxy with netsh to solve the problem, but powershell update-help clearly don't ...
1
vote
1answer
119 views

Set up RDS on multiple servers using PowerShell

A follow-on to this question. I've installed an RDS Gateway and Connection Broker on one host, and Session Host on a second dedicated host: Server A (colombes): Add-WindowsFeature –Name RDS-Gateway ...
0
votes
1answer
332 views

Managing inherited mailbox permissions in Exchange 2007

Reviewing the Full Access permissions on a mailbox using Exchange Management Console (EMC) does not show you the whole picture. Example - EMC shows no permissions for the account Domain\administrator ...
1
vote
1answer
252 views

Using powershell to disable services, fails with 'specified service does not exist'

I am trying to run the following powershell command to disable Superfetch on a Windows 8.1 machine. Powershell window is open as Administrator and I am logged in as administrator. Set-Service -name ...
8
votes
4answers
630 views

PowerShell DSC copy from network share

I am trying to use PowerShell DSC to copy folder contents from a network share. Here is the code: Configuration TestSetup { Node localhost { File Test { SourcePath = ...
2
votes
1answer
842 views

Import-Module Azure fails

I am trying to work with Windows Azure PowerShell module on Windows 8.1. I have downloaded and installed the Azure module and in start I can run and use the "Windows Azure PowerShell" which is a PS ...
1
vote
1answer
103 views

powershell 4.0: Desired State Configuration requirements for remote clients

The whole DSC framework looks awesome, but I'm curious about the requirements of the remote machines. I create a custom MOF file and apply it to remove machines with Start-DscConfiguration (I'm ...
3
votes
4answers
116 views

powershell script waits for printing output until I press a button

I wrote a PS1 script that will count how many processes (in this case MS Project) are running on a Citrix farm. The code it's: $variable=(query farm /process | where { $_.Contains("WINPROJ") } | ...
3
votes
1answer
180 views

Windows 2012 R2 scripted access to freespace of physical disks?

Is there a way to access the freespace of the physical drives that make up a storage pool on Windows Server 2012? I've just recently ran into a problem with running out of space, and can see the ...
3
votes
2answers
542 views

Remove all recurring meetings scheduled by terminated user

I am looking for a way to efficiently and effectively remove all meetings that a terminated user may have created during their tenure. Currently, our group has to grant admin access to the user's ...
3
votes
1answer
799 views

Windows 8.1 Hyper-V network adapter is set to public and won't save as private

I have a collection of Windows 8.1 machines that run Hyper-V for unit testing. We often use PowerShell to script changes to these systems to ease our administration. However, we've been having trouble ...
1
vote
1answer
4k views

Convert Hyper-V .vhdx file for import into .vhd file for xenserver import?

A VM was sent to me as .vhdx instead of .vhd and I need to import it into xenserver which supports .vhd but not .vhdx. I looked at the following solutions: Convert-VHD via Powershell Hyper-V ...
3
votes
1answer
237 views

How can a set a Security Group's email address using PowerShell?

I need to create many groups with email addresses. I would prefer to use Security Groups to reduce the number of groups we have to maintain, otherwise we'd have an identical Distribution Group for ...
1
vote
1answer
158 views

How to get application for application event log

I have some servers that are commonly having error 1000s. I want to find if it's the same application all the time, or if it's different applications. I am using this: Get-EventLog application 1000 ...
2
votes
3answers
409 views

power shell error: Cannot bind parameter

when i am trying to execute the below PowerShell command, i got error . The command : *PS cert:\currentuser\authroot> gci | where subject -like "UTN"* The error is below : Where-Object : Cannot ...
0
votes
0answers
189 views

ldifde command is failing with "Invalid Parameter: Bad argument '-i'. And also any equivalent PS Cmdlet?

OS - Windows Server 2008 R2 Localhost: DC as well as running an AD LDS instance Here are the command(s) I used: ldifde -i -u -f differences.ldf -s localhost:50004 -b myUserAccount MyDomain ...
0
votes
0answers
78 views

scurity tab is missing in ADSI Edit for AD Lightweigh Service instancess. (authorizing users in AD LDS)

I am new to AD LDS. I have installed AD LDS instance in my Windows Server 2008 R2 and 2012 servers as I want to you use AD LDS instance for directory services for my app. I am able to install the ...
2
votes
3answers
107 views

Unable to identify properties on item in powershell

In attempting to answer this question I came up against something that has bugged me for a while, and I have not been able to find an answer for. The following script block will list the names of all ...
1
vote
2answers
205 views

Executing a git command using remote powershell results in a NativeCommmandError

I am getting an error while executing a remote PowerShell script. From my local machine I am running a PowerShell script that uses Invoke-Command to cd into a directory on a remote Amazon Windows ...
1
vote
2answers
237 views

Adding/Enabling windows feature using chef

I am writing chef cookbook to add/enable some of the windows feature. For enabling I am using powershell_script resource and below is the powershell script. Import-Module Servermanager ...
2
votes
1answer
2k views

PowerShell Script to list a server's users, groups, permissions, etc

I'm looking for a PowerShell script that will query and output all the local and AD users, service accounts, and groups on a given Windows servers. I need the script to recursively list the members of ...
0
votes
1answer
131 views

psremoting and credssp authentication to localhost

I have two machines A and B. both have: psremoting enabled, credssp enables as both client and server. from machine A I can create a new pssession to B with -Authentication credssp from machine B I ...
3
votes
2answers
611 views

How to force powershell to refresh cached data? Get-ChildItem results for PSDrive not current

Import-Module WebAdministration $pool = "ChannelServices" $wp = Get-ChildItem "IIS:\AppPools\$pool\WorkerProcesses" Get-Process -Id $wp.processId Restart-WebAppPool $pool sleep 5 Get-ChildItem ...
1
vote
1answer
55 views

How do I pull up a command prompt on an Azure Website instance?

I am running an instance of the Ghost blogging platform on Azure. Setting it up was simple, I used a template from the gallery and it was set up in no time. FTP'ing into it to do work like template ...
2
votes
1answer
296 views

Powershell script runs in an infinite loop when executed a certain way

I'm using the Exec Powershell provider for Puppet to run some powershell scripts. I'm having an issue with the way it executes my script. The method of execution causes the script to run over, and ...
3
votes
1answer
252 views

SCCM WMI Get Patches that require reboot

How can i get all patches that require a reboot before running the install process using WMI and SCCM. So far i have this wmi query that lists all the available patches but none of the properties ...
5
votes
1answer
203 views

Remove Server 2012 Remote Access Server

My IT director was walking me through setting up a Server 2012 VPN/RA server. We did not do this in our test environment, and now I would like to remove it. I know that when installing this server it ...
2
votes
1answer
416 views

How to resolve powershell Error Internal Windows powershell error. Failed 80070002

I have a Windows 2008 R2 SP1 server with all current windows updates. I am attempting to run powershell but it gives the following error: Internal Windows PowerShell error. Loading managed Windows ...
2
votes
1answer
94 views

How do I install Microsoft Exchange 2013 with Microsoft Powershell DSC?

We are working on a new build procedure. As a proof of concept, I wanted to install an Exchange 2013 server with CAS and Hub roles. I cannot find documentation on just how to do that. Has anyone ...
1
vote
1answer
166 views

How can I retrieve the data types of properties when querying WMI via Winrm

Winrm allows me to query WMI via the WS-MAN protocol as opposed to DCOM. However, in the DCOM implementation I can retrieve the data types of the various properties of the various classes I query. ...
0
votes
1answer
173 views

How to export Exchange public folder permissions and import them to a different system?

I'm involved in a migration from Exchange 2010 to Office 365 (Exchange 2013); all user mailboxes have already been successfully migrated, but due to some glitch or bug that even Microsoft's support ...
0
votes
1answer
23 views

Read-only access to external mailbox exchange2010

I try set permission RO for external mailbox. I try do this with this solution http://exchangeshare.wordpress.com/2009/07/07/how-to-setup-read-only-mailbox-in-exchange-20032007 And doesn't work. I ...
0
votes
1answer
39 views

Tell Import-Module to run once

When using Import-Module to import Powershell in a script, how can I tell it to go ahead and actually import the modules, suppressing the confirmation message? Is there a way to do this with ...
0
votes
1answer
228 views

Exchange 2010 disable authentication to distribution groups by default

I know this is against best practices, but I have been unable to find a way to make this the default setting when creating new distribution groups on Exchange 2010. I know how to do it from EMS and ...
1
vote
1answer
74 views

Powershell array sum on column based on another

I've got a custom object retrieved from a SQL Query which looks like this This is basically how I've constructed the object and it works fine but I can't seem to find how to group them. foreach ...
2
votes
1answer
337 views

How to delete event source windows 2008

I would like to delete an event source in windows 2008. I don't want to delete the log event, just the source. How do I do that? I don't find any command i PowerShell that does that. PS > gcm ...
4
votes
2answers
379 views

How to remove the SMTP address for a secondary domain from all Exchange mailboxes?

I have an Exchange server which used to manage multiple SMTP domains; now it only has to manage one. I have already removed the secondary domain from all address policies; I need to remove all SMTP ...
3
votes
1answer
246 views

Add a binding to an IIS site using powershell

I'm trying to control bindings in an IIS app using powershell. I'd like to create a site with both a http and https binding using a script. This is what I have thus far: Param( ...
3
votes
2answers
47 views

How to set IIS Remote Management Restrictions policy using PowerShell (server core)?

I'm setting up an IIS 2012 R2 system in a server core environment. I've enabled the IIS management service and assigned a cert, but can't find how to configure restrictions on what IPs can connect to ...
0
votes
1answer
133 views

Using Powershell Save-AzureVhd to Back up VHD file Receiving 403

I am executing the following command: Save-AzureVhd -Source "http://portalvhdsxg6g1pj669bv1.blob.core.windows.net/vhds/{my_vhd_name}.vhd" -LocalFilePath "D:\Virtual Machine Backups\AzureVM.vhd" ...
0
votes
2answers
102 views

Powershell - I can create folders with a future date label, but the year is not changing

So, I use Powershell to archive user directories, after a user has left. We keep the archive for 6 months before we delete it. The script is supposed to label the archived folder as "DeleteAfter-(6 ...
2
votes
2answers
114 views

Why is my WinPE 4 image growing and growing after every commit?

I am currently building a WinPE 4 ISO and I am wondering why the ISO file keeps growing after every commit and iso build. All i am changing is some lines of powershell code, which for sure are not as ...
1
vote
2answers
632 views

How to configure and enable NAT with server core installation

Using Microsoft Server 2012 Core: What is the equivalent core/Powershell command to enable and configure NAT. I have configured NAT on servers with the following GUI steps: Server Manager, Tools, ...