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
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
291 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
88 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
238 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
64 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
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
62 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
408 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
159 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
123 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
64 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
761 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
130 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
408 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
121 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
238 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> ...
6
votes
1answer
197 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
74 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
66 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
117 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
430 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 ...
2
votes
1answer
543 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 ...
4
votes
1answer
697 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.
1
vote
1answer
66 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 ...
3
votes
1answer
66 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
1answer
244 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
182 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 ...
0
votes
1answer
130 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 ...
3
votes
1answer
107 views

DSC-Resource: How can I delete a registry key (not value)?

I know I can ensure the presens of a specific registry value by using the following scriptblock: Registry ConfigureRegistry { Ensure = "Present" Key = ...
0
votes
0answers
285 views

Server 2012 scheduled task for SharePoint 2013 backup

I have Windows Server 2012 with SharePoint 2013 setup. I created a PShell script and saved it to a ps1 which backs up the Farm: Add-PsSnapin Microsoft.SharePoint.Powershell Backup-SPFarm -Directory ...
1
vote
0answers
129 views

Managing Linux server from PowerShell using built-in credentials

I am the admin of a small Linux cluster running Ubuntu Server 14.04 and my workstation is Windows 10 Technical Preview (yes, a bold move to use it in production). There is an excellent free scriptable ...
1
vote
1answer
97 views

Restart-Server Powershell Port

I just ran into a problem with my remoting project in Powershell. I'm trying to remotely reboot a server sitting in a DMZ from within our intranet but get an RPC server unavailable error. The RPC ...
5
votes
2answers
321 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 disallowing ...
1
vote
1answer
64 views

Querying for Disabled AD Users in PowerShell

When running a query such as Get-ADUser -Filter * | select DistinguishedName, Enabled the Enabled column has a lot of null values (I was expecting true or false only). Why is this? Is there a ...
2
votes
2answers
193 views

Reporting SCEP update and scan

I am using Microsoft System Center Endpoint Protection on all of the workstations I manage. For all three major platforms, it is a pain to get it to report on when it was last updated and last ...
1
vote
0answers
198 views

AuthorizationManager error when running ANY Powershell script (Invalid class also)

One of our Win Server 2008R2 crashed today, then after restarting it, I cannot run any Powershell script on it, I get the error "AuthorizationManager check failed." When I run the Get-ExecutionPolicy ...
3
votes
1answer
157 views

Find Full or Differential backup from .bak (with powershell or by any other means)

I'm trying to determine whether an MS SQL backup file (.bak) is Full or Differential. Is there an easy way to do this? A way of doing this in powershell?
0
votes
1answer
135 views

How to override the “get-childItem” command in Powershell?

Could I override this command? I want to do my own job when I execute the "Get-ChildItem" command in Powershell.
1
vote
2answers
347 views

Disable NIC advanced properties in Windows server 2008/2012

I have some Rackspace VM's and need to disable these advanced NIC properties: Correct TCP/UDP checksum value IPv4 checksum offload Large receive offload Large send offload version 2 TCP checksum ...
0
votes
1answer
570 views

Importing available module into PowerShell v2.0 results in error

I'm trying to import a PowerShell module to do some SSH work. I've unlocked all of the files I'm trying to import in the module. The module itself is located in a directory where modules are to be ...
1
vote
2answers
438 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 ...
4
votes
2answers
1k views

one of two parameters mandatory

I'm trying to make a solid PowerShell function with parameters. Now the problem is I don't get the ParameterSetNames to work. What I want to get is that computername OR ipaddress is always ...
1
vote
3answers
453 views

Replacing a string in an XML with Powershell causes MALFORMED XML

I have a rather large XML file that I need to replace some connection strings within. I use the following code to replace the strings: $temp = Get-Content .\bigxmlfile.xml ...
1
vote
1answer
121 views

Powershell sort-object, csv

I got two *.csv files. The first contains this IP, MAC, Name, Comment 10.10.122.1, 66-55-44-33-22-11, testuser1, this is testuser 1 10.10.122.100, 66-55-44-33-22-12, testuser2, this is testuser 2 ...
3
votes
1answer
164 views

New-ADUser ADException NotSpecified

I am receiving an error when I run this powershell command to add a new user: PS > New-ADUser -Name "user1" -GivenName "test" -Surname "User" -Path "ou=Users" The error returned when run is: ...
1
vote
1answer
62 views

How can I retrieve the device information?

From Windows Server 2012 R2, how can I retrieve a device's vendor name and model number without physically opening the machine? For instance, PCI cards. Get-WmiObject Win32_PNPEntity returns a bunch ...
2
votes
1answer
217 views

How do I invoke scanstate from the USMT for a large number of PCs?

I've already customized all of my XML files, but I'm having trouble figuring out the logistics of how to script scanstate to run on a large (~50) number of PCs remotely. I have a list of PCs and the ...
3
votes
4answers
1k views

Powershell arrays and comparissons

Im a Linux Sys Admin by profession, but am having to do some powershelling. My problem is this: Im getting a list of active users from the AD with this command: $allusers= get-aduser -Filter ...
5
votes
1answer
53 views

What is the difference between Approve or Approve for Optional Install In WSUS

I have been diving into Powershell for methods to deal with my WSUS better. I have noticed that an update gives the option of Approve or ApproveForOptionalInstall. Whilte I can find many articles ...