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)

0
votes
1answer
97 views

Powershell cmdlet requesting optional parameters as mandatory when running as script

I am trying to use powershell to create a script which I use to add vpn connections to windows 8.1 machines. For this microsoft has made the add-vpnconnection cmdlet. When running add-vpnconnection ...
0
votes
1answer
360 views

Powershell use Get-WinEvent with hashtable to query very specific time range

I'm trying to make a powershell script that essentially automates the account lockout tools. ideally I'll be able to get a fairly efficient query that can identify recently locked out accounts then ...
0
votes
1answer
764 views

Powershell execution policy within SQL Server

Can anyone help? Firstly I apologise if this is the wrong forum and for the amount of text you have to read. I'm not allowed to post images yet and a picture is worth a thousand words..... When ...
0
votes
1answer
101 views

Script for finding users who does not have specific aliases entry - not working

I wrote the below script for finding users who does not have specific aliases entry in the exchange account, but it returns all user in the OU. can someone help. thank you Get-Recipient ...
0
votes
1answer
382 views

Querying for inactive users from a specific OU using powershell with the help of AD filter and LDAP filter

I am trying to get the list of all inactive members from a specific OU named inactive with the following queries: ...
0
votes
1answer
67 views

Copy specific files listed in a CSV file

I'm working in a Windows 2008 R2 Server and I'm trying to copy certain files listed in a csv file from one partition to another, headers are: ZipFile,Site.A,Site.B ZipFile column contains the ...
0
votes
1answer
363 views

Using New-ADComputer's -ServicePrincipalNames

I'm trying to use the New-ADComputer -ServicePrincipalNames parameter with no success. $comp = New-ADComputer -passthru -name "server1" -path "ou=Org2,ou=Org1,dc=mydomain,dc=com" -DNSHostName ...
0
votes
1answer
1k views

Exchange 2010 Search-Mailbox to delete Exchange Journal emails

I am using this PowerShell command to try and delete emails from our Exchange Journal, [PS] C:\Windows\system32>Search-Mailbox -Identity exchangejournal -SearchQuery ...
0
votes
1answer
66 views

How do I create a mailbox in powershell and determine which mailstore it creates it in?

I need to edit a powershell script that creates new users and add a section that creates them a mailbox, problem I am having is that I need it to check the first letter of the username to determine ...
0
votes
1answer
274 views

Automate app pool recycling of an Azure Cloud Service Web Role

How can I script (e.g. using PowerShell) the action to recycle the app pool of a web site hosted in a Web Role on Azure Cloud Services? Only one instance of the cloud service is running (used for ...
0
votes
1answer
53 views

Extract Summary property from VMM with PowerShell

I have a Windows Server 2008R2 running SCVMM 2012. I successfully removed a virtual machine, according to the Jobs output from VMM, as seen in this screenshot. As you can see, the VM has a red ...
0
votes
1answer
342 views

Powershell IIS works in command line but not in asp.net

I am trying to run a add-website script via asp.net. Where I want to be able to easily add new websites as an administrator. But I have the issue the command is not recognized. The command line ...
0
votes
1answer
351 views

Installing SQL remotely using Invoke-Command

i'm trying to install SQL Server 2012 on Win 2012 r2 server remotely via Powershell using Invoke-Command, but it fails with this error "Validation for setting 'SQLSVCACCOUNT' failed. Error message: ...
0
votes
1answer
140 views

PowerShell won't rename an export .csv file

I am trying to rename the file export.csv to the $name but with a .csv extension instead of .file. The output is still $name.file. Import-Module ActiveDirectory $name = Read-Host "Enter Group Name" ...
0
votes
1answer
114 views

Pstools or Powershell or Both

I'm having a problem at the moment deploying and managing windows services and I'm looking for advice on the best course of action. Here's what I have working (below) - the problem is it's a bit ...
0
votes
1answer
123 views

Delete files except ones created on sundays with in last 4 weeks

I have a script that copies some files around and deletes older files from destination. right now it just deletes everything older than 10 days. to increase backup retention we need to keep files that ...
0
votes
1answer
207 views

What rights should non-admin user have to run Get-WmiObject?

I am trying to monitor windows machine with the help of wmi and powershell remoting. I managed to successfully start remote session with that machine throught non-admin user account, but now I have a ...
0
votes
1answer
241 views

Change an IISExpress site's physicalPath on the command line

What's the easiest way to accomplish this? I see there's lots of examples for appcmd relating to IIS proper, and using powershell for same, but I can't see an API of sorts for reconfiguring the ...
0
votes
1answer
270 views

Auto-Tagging EC2 Instances in AWS (Windows Servers only)

I am looking for some guidance from the serverfault community. We are spinning up several new AWS instances (windows server 2008/2012) over the next few days. We have a naming convention in place for ...
0
votes
1answer
415 views

List current Principals in group Managed Service Accounts

Is there a way to list the current list of all the groups and/or hosts in the PrincipalsAllowedToRetrieveManagedPassword property of a gMSA (group Managed Service Account)? There isn't any help on ...
0
votes
1answer
960 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
50 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
306 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
1answer
300 views

How to get the outlook folders size with PowerShell from Windows 8

I need to retrieve the size (in MB) of all folders of my mailbox(including sub-folders) with PowerShell (like the Outlook feature: Data File Proerties/Folder Size). Is there a way to do that from my ...
0
votes
1answer
880 views

DPM 2012 running powershell script in task scheduler

I'm having a problem running a custom PS script I created to attach systems into the console. My PS script works when i'm running it interactively in the DPM Management Shell. I was referencing this ...
0
votes
1answer
171 views

How to get process not responding on remote server with Powershell

I don't understand, responding is empty on remote serveur. Get-Process explorer -ComputerName vcass1 | select name,id,responding Name Id Responding ---- ...
0
votes
1answer
184 views

Powershell script to bulk import PSTs into mailboxes based on primary smtp address

I have about 30 PST files which I need to import into mailboxes in Exchange 2010. They are all named by the first part of the email address. For example with johnsmith@domain.com, that PST would be ...
0
votes
1answer
91 views

Pinging the hostname of the server I'm on does not reach out to DNS, responds with 'lowest' numerical IP

For example: Server: server1.contoso.com IPs present on server: Initially configured statically with 10.10.20.100, it had two additional IPs added to the same NIC, 10.10.20.20 and 10.10.20.102. A ...
0
votes
1answer
339 views

Powershell error when adding filepath

The script looks like this: $searchOU='ou=Servers,dc=mydomain,dc=NET' Get-ADComputer -filter * -SearchBase $searchOU | Foreach-Object { $server = $_.Name ...
0
votes
1answer
357 views

lookup file name in sql and rename file

I am trying to use a Powershell script to use the account number in a file name and re-name with the ID number from a sql database. Below is the code I am using to attempt this and I am not getting ...
0
votes
1answer
2k views

How to save event logs “Network Policy and Access Services” on NPS server

We have a Windows Server 2008 R2 Enterprise server with NPS role installed in it. (We dont use NAP). Is there any way, we can save all the event logs in------ Event Viewer -> Custom Views -> ...
0
votes
1answer
734 views

Transferring DHCP using Windows Server Migration Tool - Why is Powershell is crashing on the import of the .mig file?

I am migrating DHCP from a windows server 2003R2 DC to a Windows Server 2008R2 DC I've followed this video and its predecessor (Installing Windows Server Migration Tools) ...
0
votes
1answer
241 views

PowerShell in SQL Server 2008 R2

In SQL Management Studio there is an option to start PowerShell via right-click on a database (for example). However, I cannot run queries from that PowerShell session because, it claims, the login ...
0
votes
1answer
633 views

Powershell Script Scheduled Task Stopped Running (Could not Start)

I'm running a scheduled task (for Powershell Script) on Windows 2003 Server. I believe the script works fine. The task is scheduled to run every 10 minutes from 7:00am to 11:50pm everyday. However, it ...
0
votes
1answer
189 views

How to set acl on a file in remote website using msdeploy & powershell/psake

I am running a build process in powershell and using msdeploy to deploy a website to a remote server. I need to set acls on a particular file either when the site is deployed or post deployment. What ...
0
votes
1answer
208 views

Exchange 2010: disable some functions for users via powershell

I am setting up a environment, where not all users should have access to all functions. Basically, I want some users to only have these functions: Personal mail folders Personal Contacts Personal ...
0
votes
1answer
391 views

Is there a registry key change that will by-pass the Windows Domain Join Welcome page?

I'm scripting some Windows Server 2008 R2 builds using Power Shell. Some software needs to be installed after the server has joined the domain. Since I want to automate everything, I'm looking to ...
0
votes
1answer
266 views

Add a SQL user similar to a current user via PowerShell?

I'm slowly but surely perfecting a new user script. As it is, my script will do everything to add a new user to our domain, except one thing. We have an in-house program, webpage front end that ...
0
votes
1answer
191 views

Count open Office Word Files

I have troubles to find a solution for my problem (I am a really beginner of powershell). I have to count the Office files which are open on a server. My situation: A Service account is connected ...
0
votes
1answer
155 views

How to access shared folders

I have VPN tunnel between two computers and through WinSCP (or any other SFTP client) I can access shared folders. Is it possible to access them outside the SFTP client (in the OS)? I have to access ...
0
votes
1answer
107 views

Running external programs from PowerShell results in error. Why?

I have a PowerShell script that starts several external programs and batch files. All of calls worked fine on my Windows XP/PowerShell 2.0 machine. On a Windows Server 2003/PowerShell 1.0, however, ...
0
votes
1answer
129 views

Exchange Server 2010 SP1: Powershell scripting

How can I get a list of users that got the checkbox unchecked for advanced security "Allow inheritable permissions..." on the Exchange Server 2010 ? How can I enable it bulk using AD PowerShell?
0
votes
1answer
170 views

PowerShell -replace operator exhibits quirky behavior with particular data

The presence of the special PowerShell variable $_ in the replacement string causes odd behavior; I am wondering if there is something about escaping I am missing or if this is just a defect. The ...
0
votes
1answer
644 views

Has anyone used WMI_OfflineFilesCache::RenameItem to rename offline files?

The reason I ask is that I have been researching how to rename items once an offline files target has been changed. It seems that so far there are two options: CSCCMD.exe - Which appears to be a ...
0
votes
1answer
625 views

.Net SqlClient Data Provider error when comparing keys in powershell DB install

I am trying to install Databases on a new windows 7 machine with powershell code that was meant for windows xp. I have been able to fix most of the problems as I have come across them but I have been ...
0
votes
1answer
218 views

Uninstalling PowerShell 1.0

I am attempting to standardize our PowerShell deployment and usage across all servers, which involves uninstalling PS1.0/installing PS2.0 on Server 2003 machines. In searching for KB926139 through CMD ...
0
votes
1answer
387 views

Programmatically assigning an existing ssl cert to a website in iis6 via powershell or vbscript

I have the following powershell script that creates a new website in IIS6: https://github.com/dagda1/iis6/blob/master/create-site.ps1 Does anyone know how I can assign an existing ssl cert to the ...
0
votes
1answer
308 views

get-wmiobject failing across subnets?

We have two sites linked by a VPN handled by two dedicated Netgear VPN routers. Each side has a Win2003 domain controller. Each site can ping all the machines at the other. The domain controller ...
0
votes
1answer
314 views

Get-ChildItem fails to connect in SQLSERVER drive

I'm having some trouble with the SQLSERVER PSDRIVE. See error below. I only have named instances on my PC, both 2005 and 2008 Added the SQL snapins. The PC is named YODA The SQL instance is SQL2008 ...
0
votes
1answer
295 views

Getting error when trying to retrieve a security Descriptor from a Win32_Service class

I'm trying to retrieve the security descriptor of a Win32 Service. For that, I'm doing, in PowerShell, $sd = (Get-WmiObject -class Win32_Service | ?{$_.Name -like ...