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
92 views

Moving computer with powershell in MDT

I have MDT 2013 deploying several images. With Powershell I would like to move them to the correct OU as well. Is that possible? I was trying with the following but it does not seem to work: ...
2
votes
1answer
92 views

Powershell: Secure Strings with Sysprep

I have two Powershell scripts I'm building for a Windows 7 image. Prior to the image I run PRE-IMAGE.ps1, and it has a line like this in it: $JoinDomainPassword = Read-Host -Prompt "Please enter the ...
0
votes
0answers
15 views

EC2 UserData analog for Windows on ESXI

Are there any analog of the ec2 user data for the Windows on ESXI? I want to solve following task: when new instance starts at the first time on ESXI hypervisor it need to be bootstraped with some ...
0
votes
5answers
259 views

Can you use powershell to “spin up” new VM instances

Learning powershell and working on creating VMs with Hyper-v. I was wondering is there a way or an ideal way to go about installing/setting up guest operating systems as well with it? So far the only ...
1
vote
3answers
577 views

Is it possible to migrate Azure VM image from one Subscription to another Subscription?

I recently captured one azure vm image in one storage account, and planning to migrate this image to another storage account under a different subscription. I used PowerShell Script to run this task, ...
2
votes
2answers
71 views

Bizarre behavior of e-mailed reports (text files) via Task Scheduler

I’m still pretty new to powershell and practical implementations of it… but I created a script to monitor disk health and have some very bizarre results on 2012 R2. Wondering if anyone has seen the ...
3
votes
1answer
93 views

How to get a list of RUs, SPs and other updates installed for Exchange from a command line or PowerShell?

Is there a way to get a list of updates, rollups, service packs installed for the MS Exchange Server from a command line, PowerShell or Exchange Management Shell? I already tried Get-Hotfix, ...
1
vote
1answer
210 views

IIS backup on Multiple servers from Powershell

Can someone help me with backup of IIS on multiple servers from powershell script remotely. I can take backup of IIS from powershell command. backup-webconfiguration -name IIS_backup. Also i have a ...
1
vote
1answer
140 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
108 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 ...
3
votes
1answer
134 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
90 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
142 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
113 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
170 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 ...
2
votes
1answer
40 views

Powershell Array search for keys

I Have an array called $a echo $a gives: url load --- ...
4
votes
1answer
56 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
92 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
81 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
280 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
661 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
185 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
1k 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
15 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
1answer
66 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
392 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
162 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 ...
5
votes
1answer
1k 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
105 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" ...
2
votes
2answers
100 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
324 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
553 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
56 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
99 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
289 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
1answer
52 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
358 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
98 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
256 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
84 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
109 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
69 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
433 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 ...
1
vote
1answer
1k 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
172 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
130 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
68 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
832 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
135 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
427 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, ...