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

How to run mysql prompt in windows powershell ISE?

I want to use PowerShell ISE tab to be able to connect mysql client and tun sql statements, however as soon as I connect to client using following command - >mysql.exe ...
0
votes
1answer
22 views

How to start multiple Azure VM at the same time?

I'm trying to use Powershell scripts to start multiple VMs at the same time. I only know how to start one single VM or all VMs at the same time, but in my case, I only want to make change to selected ...
2
votes
1answer
25 views

Windows Desired State Configuration / DSC: Is there a simple, “flat” way to use them?

The articles all discuss staging, packaging and a bunch of infrastructure aspects. Is it possible to just run the scripts, either locally, or (preferable!) against a remote server? E.g. ...
0
votes
1answer
36 views

Editing XML files from powershell

I have this XML file below which I need to edit. <?xml version="1.0"?> <rdwastr:strings xmlns:rdwastr="urn:microsoft.com:rdwastrings"> <string id="PageTitle">RD Web ...
0
votes
0answers
19 views

PowerCLI Move-VM Returns failure but vm still moves

I have a script that is moving VM's from one datastore to another. I have other logic to protect the Storage backend and fabric from over subscription and to wait to submit new requests at specific ...
0
votes
1answer
20 views

Is it possible to execute Azure automation runbook on Visual Studio?

I am considering about two cases. One is edit runbooks on Visual Studio, then execute them to perform Automation task directly. Another one is that edit runbooks on Visual Studio, then I use ...
1
vote
1answer
27 views

Can I execute Azure Automation Runbook on PowerShell?

Actually I want to run these runbooks by myself, not relying on Automation Part. In this case, I can choose when to deploy them, and also it is flexible for me to choose variables. It would be better ...
-7
votes
0answers
39 views

How can I loop my Powershell script? [migrated]

How can I loop my powershel script? It copies the local NTUSER.DAT to the file server, I understand that the local NTUSER.DAT file may be locked by the operating system so my COPY may fail. I need it ...
2
votes
1answer
32 views

Powershell Array search for keys

I Have an array called $a echo $a gives: url load --- ...
4
votes
1answer
41 views

Powershell - Merging Results in one table

I am new to powershell. I am trying to create a report that shows AD accounts that expire soon. The report should include the User Name, AccountExpirationDate and the Manager. I have the ...
1
vote
0answers
22 views

How do I script a change to the msmq storage location on Windows 2008 R2 server

Is there any way of doing this through a batch or powershell script? I'm looking for a way to set up several new servers. The only thing I found on the subject leads me to believe you cannot: from ...
2
votes
1answer
29 views

How to Automatically Tust Auto Enrolled Code Signing Certificates

In my organization all developers are setup to be granted a Code signing certificate via Auto Enrollment. Additionally, PowerShell is configured by group policy to require all scripts to be signed. ...
1
vote
1answer
25 views

How do I find the mailbox name for an exchange 2010 account so I can connect using mapi

I was redirected here from Stack Overflow, so my apologies if this happens to be off topic. I have an issue at the moment where I am trying to set up a connection between my exchange account and a ...
7
votes
2answers
66 views

Enable Certificate Enrollment Policy and Request a Cert using PowerShell

Right now, I'm doing the following to request a cert from a CEP server: Open gpedit.msc Under Computer Configuration > Windows Settings > Security Settings > Public Key Policies, double click ...
1
vote
1answer
32 views

Deleted GAL in EMC and ADSIEDIT now Error

I attempted to delete a Global Address List via Exchange Management Console and ADSIEDIT as I made a typo during the creation. Now when I try to create a new GAL, i get the following error [PS] ...
2
votes
1answer
132 views

Using Powershell to update users home directory

I am trying to change the home directory path to a bunch of users. I wrote a script in Ppowershell which should change the path the username like so: \\serverName\shareName\$_.SamAccountName The ...
1
vote
0answers
10 views

Does Stop-CauRun Stop the Current Server or the Whole CAU action?

When using a PreUpdateScript or PostUpdateScript with "Windows Cluster Aware Updating" and "Updating Run Profiles" would calling the cmdlet Stop-CauRun do any of the following: Would it actually ...
0
votes
0answers
19 views

List mapped zombie drives in powershell

I'm writing a little powershell script for some basic logs that have to be generated. Right now I'm stuck with logging mapped network drives: $colDrives = Get-WmiObject Win32_MappedLogicalDisk ...
2
votes
0answers
39 views

How to retrieve a MDT task sequence variable and use it properly inside Powershell

I'm trying to retrieve a MDT task sequence variable inside a Powershell script, then use that variable in a Powershell function. My problem lies in that the variable I want to retrieve contains a ...
1
vote
1answer
18 views

How do I take an eml file and place it in the inbox for journaling, without sending the email?

I have an archiving system that reads both envelope and legacy journaling messages in an Exchange 2010 environment. The journaling target is simply a mailbox that receives a copy of every SMTP ...
3
votes
0answers
48 views

Batch script is not getting executed when called by Start-Process Cmdlet

I have a strange issue on a Windows Server 2012 R2 here that just does not make any sense to me at all. I've got a PowerShell script that basically has the following structure: Function ...
1
vote
0answers
27 views

Can not install Office 2010 via winrm

I am trying to install Microsoft Office 2010, I have created a MSP and config.xml file so I can do this from Powershell, using the following command: Start-Process "C:\temp\Office2010\x86\setup.exe" ...
1
vote
1answer
32 views

How can I speed up PowerShell cmdlets that are using the -CimSession parameter?

As the title says, how could someone speed up the execution of this tiny script? Am I using the New-CimSession that right way anyway? $computers = Get-ADComputer -SearchBase ...
5
votes
2answers
307 views

Is there a way to tell how long a machine has been in an security group?

Machines get added to a security group to prevent them from getting a GPO. I'd like the machines to get removed after 30 days of being in the group. Ideally, I'd like to also be able to generate a ...
0
votes
0answers
46 views

Batch/Powershell file wont run via Task Scheduler during logoff

I'm having trouble getting my Powershell file to run from Task Schedule during logoff. In short, I'm trying to upload my NTUSER.DAT (roaming profile) to my profiles folder on the file server. Dynamic ...
0
votes
0answers
22 views

Powershell and dsget do not return full results when querying group membership

I'm trying to get information about group membership of certain users. Ultimately I want to automate this in some way but I'm having difficulty extracting the information at all. The problem is that ...
0
votes
1answer
37 views

Powershell AD Group creation script

I am making an AD Group creation script New-ADGroup -Name "CS-WS-PROD-Admin" -GroupCategory Security -GroupScope Global -Path "$OU" -Description "Admin Rights on PROD" -ManagedBy CS-WS-SAR-ADMINS ...
7
votes
2answers
85 views

What's the difference between Remove-WindowsFeature and Uninstall-WindowsFeature?

What's the difference between Remove-WindowsFeature and Uninstall-WindowsFeature? I've used Add- and Remove- on Windows 2008 R2 boxes, but there is now an Install- and Uninstall- which according to ...
0
votes
0answers
19 views

Use Powershell to add items to Access Protection in McAfee Enterprise

I'm guessing this won't work for security reasons, but I thought I'd ask anyway. I'm trying to use powershell to send email notifications for maintenance. I've got the actual notifications and ...
1
vote
1answer
30 views

POWERSHELL: The term 'New-AcceptedDomain' is not recognized as the name of a cmdlet

I am trying to set-up a multi tenant exchange 2013 environment. Currently we have the 2013 environment in production and have a few companies using it. The drawback however is that each company can ...
0
votes
1answer
24 views

How can I use Powershell to add a site to my IIS or IISExpress server

Is it possible to add a site (and bindings) to my applicationHost.config file for IIS Express or IIS ? here's one I had to manually add (which works perfectly) ... <site name="Our Awesome ...
1
vote
0answers
44 views

How to fix powershell `Import-Module DnsClient` failure 'Cannot process Cmdlet Definition XML'

I seldom use PowerShell but I wanted to use Set-DnsClientServerAddress. Running it directly tells me I need to import module DnsClient. When I run Import-Module DnsClient I get the output below. ...
0
votes
1answer
33 views

Is there any outlook.exe /resetfolders equivalent that can be executed against all Exchange mailboxes?

Outlook can "Restore missing folders for the default delivery location" if ran with a switch "outlook.exe /resetfolders". This is good for just one or two mailboxes. What can I do if I need to do this ...
0
votes
1answer
24 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
27 views

error in msiexec for mariadb

This fails (and wont let me add /L for logging) and displays the help popup: Start-Process -FilePath msiexec -ArgumentList /i, "C:\app\install\mariadb-10.0.14-winx64.msi", ...
2
votes
1answer
71 views

How to interactively change the password of a user account on a remote windows machine (in the same LAN) from a local machine's command line prompt? [closed]

Suppose there is a user account named testuser on a windows machine and it belongs to the Users group and the Users group only. The current password of testuser is known. The question is, how to ...
0
votes
1answer
52 views

Get all local groups members and account status - locked and disabled

I am struggling to pull out from hundred of servers information into Excel spreadsheet about all existing local groups including their members with account status. Spent several hours trying to parse ...
0
votes
0answers
60 views

ConEmu, Powershell, & ANSI Colors

I've just found ConEmu and am unclear on how to make ANSI colors show in a powershell session. In particular, I'm wanting to see the colored output of a vagrant up while provisioning a CentOS vm. Can ...
-1
votes
1answer
55 views

send a command via a website to a windows server

Is there an interface or something else which provides a connection between a website and a windows server to send commands via the website to the server and the server itself perfoms it? I want to ...
2
votes
3answers
49 views

Remote PowerShell Access Window Server 2012

I am trying to create a couple files i can save on my local desktop to launch powershell sessions. The server 2008 and 2012 are install core mode only. What I can do is open powershell and type: ...
3
votes
3answers
258 views

LDAP Query behind Get-ADUser commandlet

How can I view LDAP Query executed by Get-ADUser behind the scenes, ie. this command Get-ADUser -Filter * -Properties * | Where { $_.Enabled -eq $True } | Where { $_.PasswordNeverExpires -eq $False } ...
4
votes
2answers
105 views

WMF 4.0 & DSC on Vista? Any chance?

I am currently evaluating the Microsoft PowerShell Desired State Configuration feature. Unfortunately, my company is still running more then 5000+ Vista clients (and W2003 servers), which seems like ...
3
votes
2answers
120 views

Powershell script not returning user last logon time

hopefully somebody can troubleshoot a simple piece of code that I've been messing around with. I'll open by stating I am NOT a coder and never really done much powershell. The issue is that at first, ...
0
votes
1answer
51 views

Powershell where-object speed improvement

I want to get a list of my DHCP reservations from my DHCP Server running Windows Server 2012R2. The list should contain the IP, MAC, name, description and the lease status of the reservation (just to ...
5
votes
2answers
106 views

Powershell Servermanager module not included in Windows Web Server 2008 R2

This is driving me nuts! Apparently using the servermanager module should be as easy as type: Import-Module servermanager The problem is that I don't have it. PS C:\Users\Administrator> ...
5
votes
1answer
85 views

“Get-AdComputer -filter” doesnt return anything when looking for Vista Clients

Why does Get-Computers -OperatingSystem "Windows VistaT Business" not return anything? It works perfectly for all the other OS types. Function Get-Computers { Param($OperatingSystem) ...
0
votes
1answer
35 views

How to connect remote powershell to Exchange server 2007 sp3? [closed]

I have an Exchange environment with two servers - both are Exchange 2007 sp3. Now I need to use remote PowerShell to pull some data from the servers. How do I connect remote powershell from a client ...
1
vote
1answer
35 views

Using icacls to list ownership of directories

I am trying to find out is IIS_IUSRS has FullControl of certain folders under directories. Example I have c:\inetpub\sites\ Under c:\inetpub\sites\ i have about 50 site folders In each folder i ...
1
vote
0answers
58 views

Powershell-Script is not exectued correctly

I have a power-shell-script which is called by a batch-file. The batch calls the script after it has set the execution policy to unrestricted. Currently the script does nothing more than writing a ...
8
votes
4answers
146 views

Test-Cluster Powershell cmdlet List vs Validate

The Powershell cmdlet Test-Cluster queries a myriad of data and performs validation tests which it wraps into a pretty report. If you run Test-Cluster -List you get a list of item's you can ...