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)

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 ...
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.
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 ...
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
1answer
51 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
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 ...
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 ...
3
votes
1answer
52 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
54 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
60 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
41 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
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 ...
1
vote
1answer
35 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
38 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
64 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
55 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
64 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
1answer
74 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
71 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
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 ...
4
votes
2answers
242 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
74 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
77 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
68 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
50 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
98 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
352 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
36 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 ...
6
votes
2answers
137 views

SSL Certificate management with Powershell DSC

I have a third-party issued certificate that I need to ensure is running on all targets in a given domain. Is there a way to ensure this certificate is installed by way of DSC?
2
votes
0answers
70 views

Powershell - Sort-Objects, list of IP Adresses

I got a /20 network and I want to know all used IP Adresses and their attributes like the MAC, the name and the description plus all free addresses between the used ones so that I got a long list ...
6
votes
2answers
803 views

Managing Windows Powershell from Linux terminal

I manage some Windows Server 2012. I'm learning PowerShell to manage this servers through command line. My workstation runs Ubuntu and I connect via ssh to manage Linux servers. There is a way that I ...
0
votes
1answer
25 views

Windows Server 2012 - Find files related to a Role or Feature

I have a strange requirement from a client. I need to be able to enumerate the list of files/folders that have been installed by a Role or Feature in Windows Server 2012 (R2 if the release# matters). ...
2
votes
1answer
30 views

Missing DomainControllers in Active Directory Object

We are setting up a new network environment that will have two domain controllers and ran into an issue with Windows not recognizing the existing domain controllers (DC-01 and DC-02) as Domain ...
1
vote
1answer
71 views

Adding a new Exchange 2013 mailbox from Powershell error

I am trying to add a new mailbox via the Powershell and I get the following error: #New-ADUser -Name AreallyTest -SamAccountName AreallyTest -AccountPassword (ConvertTo-SecureString Password1234 ...
2
votes
2answers
72 views

relationship between user and computer

I have been using Get-ADUser and Get-ADComputer a few times to help troubleshoot problems in the system. I have seen a few ways of identifying which user is logged on a specific machine through ...
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: ...
0
votes
2answers
69 views

Powershell script that executes another powershell remotely

It's a long story, but I need to create a SQL trigger that executes a script remotely which executes another script remotely (yeah, I know). I'm using PowerShell. I have started at the end: ...
0
votes
1answer
28 views

Which mailbox information will get-mailbox return after I move a mailbox?

Assume, I move a mailbox from one database to another. Within the retention period, get-mailboxstatistics will return mailbox information for both databases ie. there will be two entries for the same ...
0
votes
1answer
194 views

Powershell script for specifically OU

Need help with hte following, a script that can export all members of a specifically OU with in that multiple security groups. Location of the OU is; OU=Security Groups,OU=Public ...
0
votes
1answer
165 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
0answers
51 views

What are the cases when get-mailboxstatistics cmdlet returns duplicate mailbox information?

I'm using Exchange 2010 and sometimes I've noticed that the cmdlet get-mailboxstatistics returns duplicate mailbox information. For example, if I move a mailbox from one database to other, the cmdlet ...
2
votes
1answer
133 views

Running Get-MessageTrackingLog as a job in Powershell

I'm trying to create an Exchange 2010 script that will search each transport server as a job. I try the following: $transportserver = get-transportserver foreach ($ts in $transportserver) { ...
3
votes
0answers
167 views

Import Powershell AD Module during MDT Task Sequence

I have written this short powershell script to rename a computer as part of an MDT task sequence: Import-Module ActiveDirectory $AdminUsername = 'domain.com\administrator' $AdminPassword = ...
1
vote
0answers
71 views

NRPE (Winrpe) Powershell Command - Unable to read output in Nagios

I'm trying to run an Powershell script from NRPE.cfg and get the output in Nagios. When i run the script on the local (Windows) server, everything is just fine. But when i put it in the NRPE.cfg en ...
0
votes
1answer
226 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 ...
1
vote
1answer
76 views

looping Get-ReceiveConnector to grab multiple receive connectors

This is on a Windows 2008R2 server running Exchange2010. I would like to use powershell and "Get-ReceiveConnector" to grab information from about 20 configured receive connectors. Ultimately we are ...
0
votes
1answer
35 views

Microsoft Exchange 2010: How can I get a count of e-mails received for a particular mailbox for a particular date?

I am using Microsoft Exchange 2010. How can I get a count of e-mails received for a particular mailbox for a particular date? For example I want to see how many e-mails ...
1
vote
2answers
45 views

Duplicate current powershell session in a new window

Is it possible to duplicate a powershell session in a new window? I often find that I've created environment variables, activated a specific python virtualenvironment, defined one-off functions, ...
0
votes
2answers
50 views

How to plan a script to be executed at session end inside a powershell script?

I am writing a login script in Powershell which install a amount of printers, depending on the user currently loggin into Windows 7. I would like this user to remove the printers it have installed as ...
0
votes
1answer
103 views

Page files size from CSV

I've got the following script, that checks the page file size on a remote server, is it possible to run this against a CSV file of hostnames? clear $strComputer="computername" ...