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)

1
vote
0answers
15 views

Variable values to pass from local computer to remote in Pssession

I have a powershell script. Executing this will create a session with remote computer and execute some scriptblock inside remote computer. After that execution I need to send a mail. So, I get the ...
1
vote
1answer
10 views

powershell sccm import-module error

Have downloaded the sccm powershell module from https://www.microsoft.com/en-us/download/details.aspx?id=46681 Installed via the .msi no issues. On import, like so: > Import-Module ...
-3
votes
1answer
26 views

How to list OrganisationalUnits (OU's) in Active Directory with the count of users in each OU? [on hold]

I want to export the list of OU's within our organization alongside their number of users they have. So far I managed to get the list of OU's with Get-ADOrganizationalUnit -filter * | Sort-object ...
0
votes
0answers
17 views

How to add a data disk to a vm in resource manager using the resource group template file?

I would like to provision a server with azure resource manager that has a data drive. What json do I add to my azure resource group template file in order to provision the server with a persistent ...
-1
votes
1answer
26 views

Place Date in Description when moved to different OU

I am not sure if this is possible, but i am wondering if i could create a powershell script that would move any/all users listed in a CSV file to a different OU and add the date in the Desription ...
-2
votes
0answers
11 views

Trying to get nested groups in distribution groups [on hold]

I'm trying to get all the distribution groups nested in distribution group to determine the structure. Is it possible through powershell? I've a list of distribution groups in a text file for which I ...
1
vote
2answers
49 views

PowerShell persistent connection during remoting

I'm having a hard time understanding persistent connections in PowerShell during remoting sessions. I created my persistent connection and created a variable to test its lifespan: $session = ...
0
votes
1answer
81 views

Powershell script to get ad users remotely [on hold]

I have Windows 2012 server with AD installed in it, 500 users connected with it; I have a code to get softwares installed in workstation and laptops But, This code I have to run individual machines ...
-1
votes
2answers
34 views

Add user to a group in Active Directory using powershell

I am trying to add a user to a group in AD using powershell. I am using the following command: Add-ADGroupMember -Identity ...
2
votes
0answers
30 views

Adding multiple users from a group to an Active Directory group using Powershell

I have a powershell script that is supposed to go through a specific ou and store the groups into a variable $groups. Here is the code I use in the script: $Groups = Get-ADGroup -Properties * ...
2
votes
1answer
32 views

ADDS: Mandatory Profiles through powershell

Intro I'm a networking student from Belgium and I just got assigned a big project. Basicly i'm responsible for the ADDS. We have to create several OU's and every OU needs at least 20 users or more. ...
2
votes
1answer
24 views

Reset or delete remote Powershell sessions

I run a remote Powershell script to add a machine to a domain. Machine reboots, is added to the domain, all good. $Uri = Get-AzureWinRMUri -ServiceName $ServiceName -Name $VMName -Verbose $PSSession ...
0
votes
1answer
22 views

Powershell to transfer certificates to a new PC - how to determine if certificate is exportable

I'm using the following powershell to get a list of certificates including any archived ones so that I can easily transfer them to a new PC $store=new-object ...
0
votes
0answers
11 views

Has anyone had issues with getting linked mailbox details from PowerShell in Exchange 2010?

I have an Exchange 2010 environment in a resource forest with linked mailboxes which are then linked to accounts in the customer's domain. On one of the Exchange servers is a scheduled task to run a ...
0
votes
1answer
23 views

Difference between running a command through a remote module and Invoke-Command in powershell

I am in the process of trying to clean up some scripts we have and ran into an interesting issue. If I use the following to load a remote module (in this case ActiveDirectory): $cred= Get-Credential ...
1
vote
2answers
49 views

Getting All Users From Active Directory Groups Using Powershell

I have a powershell script that I've written that gets all of the groups from an OU and stores them in a variable $groups. I want to be able to access the users of each group but seem to be having ...
0
votes
0answers
37 views

How can I Deny permissions to logon to Remote Desktop Session Host server in powershell script?

I am need of some assistance please. I am a system admin and I am trying to create a script that will assist with the tedious tasks I have to do with disabling a user that no longer works for the ...
5
votes
1answer
43 views

How to clear Exchange mail queues using PowerShell for a specific user

Recently, my organization were victim of a spam attack. Sadly, some users provided their email and password. The attacker set up a long queue of emails to be sent (from the victims account). We had ...
0
votes
1answer
41 views

PowerShell just Hangs [duplicate]

Anyone else have problems when running a PowerShell script, where the script just hangs in one spot until you hit Enter or something on the console window? This happens to me all the time, and for ...
0
votes
1answer
69 views

PowerShell Script Not Running on Scheduled Task

I have been attempting to set up a PowerShell script to run as part of a scheduled task on a Windows Server 2012 R2 server. The script will run if I execute it manually from the GUI but all but one of ...
0
votes
1answer
8 views

Set-SCOMMaintenanceMode EndTime Duration Clarification

Microsoft provides the Set-SCOMMaintenanceMode cmdlet in part to manage the SCOM maintenance system. A required parameter is the declaration of how long the maintenance mode should last (-EndTime). ...
0
votes
0answers
20 views

Export mail only from Start date to Now

I am trying to export just the mail of user12 from the specific start date 03/30/2015 to Now. The following command does work without the filter MessageKind. I chose not to use -IncludeFolders ...
2
votes
2answers
42 views

Importing users to AD with CSV, cannot get some fields to work

Been trying to build a CSV file to import users into Active Directory. I can get everything to populate, except for E-mail, Password, and Enabling the user. Just using this cmdlet in Powershell. ...
0
votes
0answers
24 views

Quest PowerShell: Export AD permissions and apply them at a later stage

I'm trying to standardise our AD permissions for our 4 support groups. I've already applied permissions for 2 standard groups (Global support) and I'm now facing a painful clean-up for site based ...
0
votes
2answers
60 views

Active Directory: Track old password changes and expiry dates?

Is there anyway to find out when the last 2 passwords changes were made for an account? I reset a account password but I want to know if it already changed hours or minutes before I reset. OR maybe ...
1
vote
1answer
28 views

Creating bulk emails with different domains - PowerShell

I've been tasked with appending an email address for existing users. I have 500 users in an Exchange 2010 environment that have Company.com as their email address. For email segmentation due to ...
0
votes
1answer
18 views

Get RD user client hostname in Server 2012 R2 RD deployment [duplicate]

There is currently nowhere in the server manager GUI that I can see, that shows me the hostname of the machine a user is using to log onto our remote desktop deployment. I have had a quick look ...
-1
votes
1answer
39 views

Use PowerShell to create a web page from an array

The goal of this code eventually will be go get all other web pages within a folder and create hyperlinks to file with the name of the files. This code mostly works but puts all elements of the array ...
1
vote
2answers
19 views

Invoke-WebRequest timeout if NIC 1 disconnected

I have a windows pc with three network interfaces. One is a UMTS modem and the two others are lokal networks and one network has connection to the internet. Invoke-WebRequest ...
-5
votes
0answers
33 views

How can you Upgrade PowerShell from version 2.0 to 3.0 for Windows Server 2008 R2 Without a Reboot how can I do this ? [duplicate]

I need a way to Upgrade PowerShell from version 2.0 to 3.0 including prerequisites for Windows Server 2008 R2 ( Without a Reboot ) how can I do this ?
0
votes
0answers
35 views

Trying to add group to the security tab of an extended right

. The only problem is that the rights are not propagating to the extended attribute, even in the advanced tab :(. If I go in to adsi and check the security tab of the extended right it shows ...
3
votes
1answer
60 views

Add security rights to an extended rights guid

Any help would be greatly appreciated! Please ask if you don't understand something. I am trying to explain it as best as I can. The value I am trying to edit is ...
0
votes
1answer
43 views

What permission do another domain user need to restart IIS app pool on my machine?

Can this be done without adding user to local Administrators group? All I need is to remotely stop app pool, create site and start the pool again. I'm trying to do this with Powershell script. I keep ...
0
votes
1answer
30 views

Exchange: Auto Reply Rules

Is there a way to disable or remove the Automatic Reply Rules that can be created in Outlook with Powershell? They can be reached by clicking the 'Rules...' button under the 'Automatic Replies' window ...
4
votes
2answers
64 views

How to filter the Windows Security event log by SID?

I want to filter the event log for a certain user, but I don't think there's an option to search by SAMID. There is a filter by UserId though, according to here. Is the following correct syntax ...
2
votes
1answer
55 views

Use the DFSR Module on a Windows 2012 R2 Server Core

I have a standard Windows 2012 R2 box setup with server core. I have the file server roles installed along with DFSR. I want to use the powershell tools like Get-DfsrState and other Get-Dfsr* to ...
1
vote
1answer
42 views

Managing Exchange 2010 from Windows 2012

We have been managing Exchange 2010 from a separate Windows 2008 R2 server and recently upgraded the management machine to Windows 2012 R2. The EMC works fine but I am somewhat limited in the shell. ...
0
votes
1answer
33 views

How to run Azure cmdlets in background?

Several Azure PowerShell cmdlets have very tedious run times; a trivial task such as setting a static IP address on a virtual machine can take more than a minute (I guess this is because the cmdlet is ...
1
vote
1answer
34 views

PowerShell - How to activate Windows CAPI2 Eventlog?

I want to activate the CAPI2 (microsoft/windows/capi2) Eventlog with PowerShell. How can I activate the CAPI2 Eventlog? I do not have a solution with PowerShell. But I´m sure there is a solution with ...
5
votes
2answers
83 views

Queuing reboots in Powershell

I am working on a project to reboot a great deal of computers. One of the important requirements is to stage the reboots so all of the machines aren't rebooting at once (too fast and it will cause ...
-1
votes
0answers
17 views

SCCM Software Library Total Size Report

Is there an SQL query or powershell command to get the 1) Name and 2) size of each item in the Software library in SCCM 2012 R2? Sam Fakhreddine
1
vote
0answers
39 views

Getting Group Policy identifier in PowerShell

Some of our computers have a random "local group policy" being set that forces them to check a nonexistent intranet server for Windows Updates instead of using WU over the internet as they should. ...
0
votes
1answer
25 views

How to retrieve list of unique file name parts?

A folder with migration scripts has a mix of SQL and PHP files named like these: 2015-03-22.23-00.up.sql 2015-03-23.19-00.up.development.sql 2015-03-23.19-00.up.production.sql 2015-03-23.19-00.up.sql ...
0
votes
1answer
12 views

SCEP: imitate potential threat in both live and regular scanner to inspect logs

I am doing some powershell stuff to parse a few logs at work. I would also like to collect some information from the SCEP logs. I find the amount of logs available as well as the different locations ...
0
votes
0answers
19 views

parsing SCEP logs: last definitions update, last scan, viruses found [duplicate]

I would like to write some powershell scripts to extract some information from the SCEP log files. Particularly, I am interested in the following information when was the last scan performed? ...
1
vote
1answer
33 views

Need to create multiple emails with different domain names - PowerShell

I'm being tasked with creating a script that polls AD for specific information and then creates an appropriate email address based on that information. Please allow me to give you a bit of a rundown. ...
0
votes
0answers
27 views

Export Public Folder heirarchy to a regular folder structure/file share

What known method are available to migrate emails (.msg files) from a public folder (Exchange 2007) to a regular folder/file share? When the emails are copied over to a regular folder, it is required ...
2
votes
1answer
51 views

Is the file current.mof a bottleneck when using the DSC module?

The msutter DSC module (PowerShell Defined State Configuration) seems to have a bottleneck. Every class that uses a DSC resource generates intermediate Powershell/DSC code that creates a file called ...
1
vote
2answers
19 views

Exclusive delete to delete most files trees but keep specific ones

Im trying to create a script that when received the specific file it unzips it looks through the unzipped file and deletes the entire contents except for two or three specific folders with their ...
2
votes
2answers
60 views

Restrict user account to 'only' remote Powershell sessions

Is it possible to only delegate a enough permissions for a user to only be able to utilize a Remote Powershell session? I have a limited set of scripts that I want to run from a central location ...