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
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 ...
5
votes
2answers
1k views

Changing physical path on IIS through appcmd isn't activated

We have come across an issue on IIS 7.5 where we have a simple deploy system which consists of the following: Create a zip-file of new webroot, consisting of three folders: Api Site Manager This ...
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", ...
0
votes
1answer
23 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 ...
1
vote
2answers
959 views

Power shell script to fetch disk space on all servers in timely intervals

I got a Powershell script from here which will export Disk Space usage to html file. I want the scritp to give usage in timely intervals say each 15 mins or 30 mins. is there any way we can mod this ...
4
votes
3answers
2k views

How can I disable a scheduled task using Powershell?

I have a web application that runs on Windows Server 2008 R2, which has a large number of scheduled tasks which take care of all the backend stuff. When I do a software deployment which touches the ...
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 ...
8
votes
2answers
928 views

ESXcli command timeout at 30 minutes

I am working on a powercli script to loop through each datastore in our environment and reclaim space on the thin provisioned LUNs. All LUNs in the environment are Dell Equal Logic. vCenter ...
2
votes
1answer
5k views

How to select a user and remove all groups they are a member of using Powershell (with Quest)?

I've read quite a bit online about this and thought I had found a solution, but it doesn't seem to be working like I would expect. I am wanting to get a user based on the username I input, then ...
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 ...
15
votes
4answers
24k views

Recycle remote IIS app pool from the command line?

Is it possible to recycle an IIS7 app pool from the command line, on a different machine? I've found APPCMD (appcmd recycle apppool my-app-pool), but it only operates on the host it's run on, AFAICT. ...
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, ...
1
vote
3answers
6k 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 {& ...
1
vote
1answer
890 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
59 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
vote
3answers
4k views

How to set or clear “Manager can update membership list” using PowerShell

For distribution group, I can set parameter Manager can update membership list using the ADUC mmc, but I can't find how to do it using PowerShell. Moreover, even is Manager can update membership list ...
1
vote
1answer
829 views

Importing NTFSSecurity module from UNC path fails

I've created a central repository for Powershell modules, but I'm having trouble loading one in particular. The NTFSSecurity module is failing to import with the following message. PS Z:\> ...
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 ...
2
votes
3answers
1k views

Exchange deferred delivery: update message “Date:” header

A client is using the "deferred delivery" feature in Outlook / Exchange. For some reason this feature does preserve the original message creation time (i.e. when the user has hit the "send" button) as ...
2
votes
1answer
180 views

Powershell script scheduled task will not end

I want to use this Powershell script to automate some backups on Win7 machines. When run manually from the Powershell terminal the script runs as advertised and ends after a few seconds (it is a small ...
2
votes
1answer
39 views

How to do proper error handling in a push setup?

I am currently building a lab environment to get a feeling on what DSC can accomplish and where the limits are. We have a requirement to push out one-shot configurations to group of nodes based on ...
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 } ...
-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 ...
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 ...
2
votes
2answers
1k views

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 ...
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) ...
2
votes
1answer
267 views

Error 0x8007007e When trying to mount WinPE 5 wim in Windows 7 using Powershell

Using ADK for Windows 8.1, and the DISM cmdlets that come with them. I have WMF 4.0 installed. My machine is Windows 7 x64 SP1, and I'm trying to mount the wim using PS C:\Users\BigHomie> ...
4
votes
1answer
199 views

Powershell DISM New-Windows Image: Using a CompressionType gives an error

PS C:\ProgramData\Microsoft\Windows\Hyper-V\BigHomie> New-WindowsImage -CapturePath K: -ImagePath C:\VHDImports\Win764.wim -name "BigHomies Personal Image" -Verify -CompressionType "Max" Throws ...
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> ...
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 ...
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
1answer
50 views

Programmatically backing up KACE dump files as of version 6?

We use KACE system management appliances for some of our user systems. As of KACE 5.x, you were able to download the backup files directly off of the appliance. We utilized this method to backup our ...
5
votes
3answers
574 views

How to allow access to winrs for non-admin user?

I have Windows Server 2012 (and Server 2008, but it is next priority) to monitor it using txwinrm. txwinrm library internally is using WinRS protocol. I have to monitor it using least privileged user, ...
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 ...
4
votes
1answer
5k views

PowerShell - Finding all of users' group memberships and kicking it out of them

as title says, I have to find all the groups that the user is a member of, and deleting its membership from all of them. I've tried this: get-adgroup -filter * | where {(Get-ADGroupMember $_ | ...
1
vote
2answers
100 views

Why can't I use the Powershell command Send-MailMessage from a given server?

I'm trying to use the following command (without the line break) to relay email through an Exchange 2013 server from another server. The sending server is listed with explicit permission to relay ...
3
votes
6answers
29k views

Powershell 2: Add multiple members to distribution group with one call?

Assume I have a distribution group in Exchange which currently exists, and holds about 20 members. In Powershell 2, I have acquired a list of about seven hundred more individuals who need to be added ...
4
votes
1answer
163 views

How to export a Full SMTP Log in Office 365

In Office 365, is it possible to export the SMTP log? Maybe in powershell or any other way. My goal is to have a complete overview of all messages send from and to a specific domain.
3
votes
4answers
4k views

Test for existence of an AD object in PowerShell using only Microsoft-provided cmdlets

I want to test for the existence of a computer account in Active Directory with PowerShell using only tools from Microsoft. Using Quest AD cmdlets, I can do this: if (!(get-qadcomputer $name)){ ...
2
votes
1answer
45 views

How can a user in Exchange 2013 access public folders in Exchange 2007?

In my environment, there is an Exhange 2007 server and an Exchange 2013 server. I have a few public folders in Exchange 2007 server. I want to know how a user in Exchange 2013 can access the public ...
2
votes
1answer
50 views

Import Module from newer Powershell Version

I was asking myself if I could import PowerShell modules from a newer Windows version. The *-NetAdapter CMDLets in Windows 8 and 8.1 are quite nice, so I wanted to use 'em in Windows 7 too. ...
2
votes
1answer
93 views

Get-Cluster cmdlet fails when using -Name param

Summary When I call Get-Cluster powershell returns the name of my cluster. For simplicity sake, lets call it Cluster1. If I call Get-Cluster -Name Cluster1 it fails with an error. Error: ...
1
vote
1answer
486 views

IIS 8: Setting the application pool username is ignored

I do this on IIS 7.5: Create an application pool, "testpool", and set the username and password to match one that exists in the AD. Then in powershell as administrator: Import-Module ...
1
vote
3answers
31k views

Script to list current user's mapped network drives

I have a Windows XP/ Server 2003 environment here users have mapped different network drives themselves using arbitrary drive letters. Some of these users do not know how to tell the true UNC path of ...
9
votes
1answer
678 views

Set-RDSessionCollectionConfiguration Connection Broker connects to localhost

I am running the following command from a PowerShell console on a Windows 8 machine, trying to configure a Server 2012 R2 RDS Connection Broker: Import-Module RemoteDesktop ...
5
votes
2answers
137 views

How to force powershell to not allow an interactive command window

I am a Citrix Administrator and would like to restrict the general user population on our servers from using PowerShell to run their own scripts, or to use it interactively. We are already ...
0
votes
0answers
45 views

Powershell | DownloadString | External website | Return

I'm a totally powershell newbie, so please be indulgent ;) I'm trying to write a script where a machine check an external website waiting for a the word: "test" to execute a download. The things goes ...