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
0answers
7 views

Comparing two itmes if matches powershell

I am exporting drive name movies in text file. Get-WmiObject win32_logicaldisk| foreach-object {$volumename -Match "movies" } | select movies > c:\nn.txt And later comparing it but not ...
-1
votes
1answer
21 views

Get Error, Success Logs On powershell script Importing Bulk AD user

This Script will the best Bulk AD user creation script for me, if I am able to Generate success and error logs. This script just requires FirstName and Lastname on Csv that cut offs few minutes. ...
-1
votes
0answers
12 views

InetMgr.exe throw System.Management.Automation.CmdletInvocationException

I fired up my Windows 7 machine today and attempting to start Intemgr.exe the process terminates immediately. So I started the process under the debugger. It seems the process is terminating with the ...
0
votes
1answer
22 views

ContentFilter is invalid. System.Datetime

If i run the following $3MonthsBack = Get-Date (Get-Date).AddMonths(-3) -f MM/dd/yyyy New-MailboxExportRequest -mailbox kundesenter@company.no -IncludeFolders akriv -ContentFilter{Received -lt "$...
0
votes
2answers
39 views

Powershell - how can i list both username and group membership for users of a named group?

I am relatively new to powershell and I have two statements on the cmd line: get-adgroupmember <group name> | select-object name,samaccountname To produce a nicely formatted table with two ...
0
votes
2answers
53 views

Obtain a list of servers from AD on which a specific software is installed?

Is it possible to obtain a list of servers from within Active Directory on which a specific software is installed? For example, get all servers that have wampserver version 5 installed on them.
0
votes
1answer
45 views

Powershell change AD variable “PasswordLastSet”

Is it possible to edit the PasswordLastSet value via powershell (or any method?)? If that is not possible, is there anyway i can set so a users password (not account) expires in X amount of days. I ...
0
votes
2answers
85 views

Find Computer in AD from non-joined Windows 7

I have a powershell script we use for several things, when a new computer has been installed with Windows 7. We also use it on Windows 10, and it all works well. It runs at first login and the ...
0
votes
0answers
22 views

powershell - retrieve certificate information on remote computer [closed]

Please help... I'm trying to get the below script to work. I'm new to powershell world and I appreciate anyone who can help me fix this. $RemoteServerList = "Server1","Server2" $RemoteWebCertList = ...
-1
votes
0answers
22 views

How can I tell if there is a prepared SQL Server install on a machine using PowerShell?

How can I check in PowerShell if the SQL Server install on a machine is just a prepared install (done before a sysprep) or a full ready to go instance?
0
votes
1answer
20 views

Running Net Stop unelevated

First of all, this is one of those borderline questions between serverfault and superuser. In the end, I decided it belonged here because of the fact that most aspects of it revolve around a domain ...
1
vote
1answer
24 views

PowerShell - Find out Who has Read permissions on a Network Folder Share

In a Windows Server & Active Directory environment, where a particular network-share is shared with only certain AD users/groups. Is there a way, using PowerShell, to find out who has read ...
1
vote
1answer
39 views

Writing a script to find what computer a user is logged into

So I want to specify a username and return the computer name. When I run this, it tells me that my $computers obj is null. Why would $computers = Get-ADComputer | where {$_.accountdisabled -eq $false}...
0
votes
2answers
38 views

Need ideas for ScheduledTask to copy file from CompA to CompB

So, I'm fairly locked down in my environment, but maybe there's still a way I haven't thought of to get this done... Need to have a flat file copied from Computer A to Computer B preferably by ...
-2
votes
0answers
19 views

Workstation in domain has PowerShell | No GP to disable

I am running Windows Server 2012 and I currently have 1 workstation Windows 7. It has powershell automatically installed with windows 7, I want to disable this throught group policy but I am unable to ...
1
vote
1answer
35 views

Granting a user permissions to PS Remote without allowing RDP

Is there a way I can grant a user the ability to use Invoke-Command in PowerShell remotely without giving them RDP Access to the server?
2
votes
0answers
25 views

How can one update BGP ASN on an Azure Virtual Network Gateway?

I have an existing Azure Virtual Network Gateway I'm attempting to reconfigure for use for BGP, per https://azure.microsoft.com/en-us/documentation/articles/vpn-gateway-bgp-resource-manager-ps/ . ...
1
vote
1answer
77 views

How to copy a file to network resources using UNC paths

I'm trying to do something pretty simple, and conceptually it should work, but it doesn't seem to, and I'm not sure why. I have a file I need to copy to multiple folders on multiple servers. I've been ...
0
votes
3answers
60 views

How to SSH to all instances in EC2 cluster?

I just created a cluster using spark-ec2. I followed steps here http://spark.apache.org/docs/latest/ec2-scripts.html . Now I want to configure all slaves (150), i.e., install Java 8 for both master ...
3
votes
1answer
62 views

How to combine properties in Powershell from multiple Objects

Many times I've needed to combine data that can only be retrieved from two separate powershell CMDLETs into a single dataset for export. I believe this should be do-able by creating a PSObject and ...
0
votes
2answers
31 views

Moving all folders with only a single item inside

I have found a powershell function, which virtually does what I need, but not quite... I want to find all child folders within a parent that ONLY have one file inside. I have found some code which ...
-1
votes
1answer
71 views

Get AD users who have not logged in the past x Days and are member of a specific group?

I'm sorry if this looks like a duplicate. Actually the same question has been asked under http://serverfault.com/questions/783399/get-a-list-of-users-who-are-domain-admins-and-have-not-logged-in-the-...
1
vote
2answers
118 views

Get a list of users who are Domain Admins and have not logged in the past 30 days?

How can I get a list of users from AD who are Domain Admins and have not logged in the past 30 days?
1
vote
0answers
47 views

How to make powershell file search faster on an entire network

I'm attempting to search all drives on all machines in an AD network and my methods are not very efficient. Basically, I came up with a script like this, here's what it does: gets all computers from ...
0
votes
1answer
32 views

Query AD for users with create users access rights

My company has requested a list with all the users and groups from AD that have access rights to create users and in which OU's they have these rights. Is there a way to get a complete list via ...
1
vote
2answers
53 views

Get-ADUser over multiple OUs and filter results

This script is supposed to grab users from several OUs and assign the users to one variable, then it takes the users from that variable and filters through each one based on last logon dates over 30 ...
1
vote
2answers
60 views

Start Process as normal user powershell

I'm creating a powershell script that does some automatic setup of new computer deployments. I'm in a situation where I want to launch an executable as a regular non-admin user from an elevated admin ...
0
votes
1answer
22 views

forwardingSMTPaddress empty after remove and reassign O365 license

After a license clean up in O365, removing mail licenses of the inactive mailboxes some incidents raised... Looks like forwardingSMTPaddress parameter gets cleared/deleted after license removal and ...
0
votes
2answers
57 views

Scheduled task runs with exit code 0, but powershell script is not always executed

The situation In our organisation I made a GPO that creates a scheduled task. This task triggers at logon of two user accounts. It executes a powershell script that changes the DNS servers for the ...
0
votes
1answer
39 views

Updating a non-Microsoft DNS

I need some PowerShell tool or .NET library or that uses the DNS protocol directly, as I need to perform dynamic updates on a non-Microsoft DNS, while WMI and DNS cmdlets only work for MicroSoft DNS ...
-7
votes
1answer
123 views

SysWOW64 access denied (Windows Server 2012 Standard) [closed]

I am trying to call: [System.IO.File]::Delete($folder) from the Powershell ISE (not ISEx86). I am logged in as Domain User that is an Administrator on this machine to which I connect using RDP. I ...
0
votes
0answers
26 views

How to retrieve data from powershell runspace job

Trying to multithread some of my scripts that take a while to run. One example is getting the last login for a user. It checks all of our DC's and then returns the most recent time. We have quite a ...
2
votes
1answer
22 views

Why can't DSC find a resource that's installed?

I'm trying to apply a DSC configuration that uses a resource from a module that is installed. However, when I run Start-DscConfiguration, I get this error: The PowerShell DSC resource ******** ...
0
votes
2answers
31 views

Check out how many users or computers are authenticated in a given Domain Controller

I found a script to check out how many users or computers are authenticated in a given Domain Controller. The Script can be found here: https://gallery.technet.microsoft.com/scriptcenter/Check-out-...
-2
votes
0answers
23 views

Monitoring Windows RT/PowerShell commands being run against a system [closed]

If there's some theoretical deployment process that has PowerShell scripts running against a remote system and you need to debug it, is there a way to check whether it's still running or even merely ...
-1
votes
0answers
12 views

Windows RT Command Timeout

I've recently observed PowerShell commands being run against a remote system but then blocking and not returning when the Stop-Service failed. This kept the release-process open indefinitely. Is ...
0
votes
0answers
27 views

Palo Alto Globalprotect - connect via cmd

Scenario: Windows box having the Palo Alto Globalprotect vpn client installed. Is it possible to use commandline or powershell to connect the vpn client to a remote host? I know this is possible ...
-1
votes
0answers
12 views

powershell error in dfs commandlets while taking ps-session

New-DfsnFolder : Access to a CIM resource was not available to the client.AtD:\scripts\IAM\sharefoldermanagement\AddingShareToDFS\AddingShareToDFS.ps1:8char:5+ $a=New-DfsnFolder -Path $path -...
1
vote
0answers
24 views

Disks added to storage spaces are not picked up by virtual disk created by powershell

A time ago i had to configure a W2012 R2 essentials server with storage spaces and 2 virtual disks. As the real disk count and the disks itself where not final at that time, i had to resort to the ...
0
votes
0answers
48 views

Can't initialize VM's on HyperV Windows Server 2012

I'm really stuck with this and I can't understand why I sunddendly can't make ANY VM to start succesfully in my system. I had just one VM, and it was working perfectly, then for some reasons I booted ...
1
vote
1answer
21 views

How to use -Identity <mailbox>

The full command I am trying to run is: Start-ManagedFolderAssistant -Identity <mailbox> I interpreted that as: Start-ManagedFolderAssistant -Identity jack Is that correct? Should it be ...
0
votes
0answers
19 views

Unbind virtual NIC to a physical NIC

In Hyper-V Switch Manager from a remote machine I configured a NIC to be External and with the option for Allow management operating system to share this network adapter. The process failed mid way ...
0
votes
0answers
35 views

Disable touch feedback from command line

I am developing interactive installations using Windows 8 as operating system. A thing I always need to do is turn off the visual feedback you receive when touching the screen (the line that follows ...
0
votes
1answer
56 views

Renewing public dynamic IP via Powershell ?- Azure Resource Manager

i need your help! I'm trying to renew a dynamic IP assigned to a VM, but i want to figure it out if there's some possibility to accomplish this via powershell cmdlets without being in the need of ...
-1
votes
0answers
22 views

Powershell add csv list of users to group in trusted domain

Need to import list of users into a group in a trusted domain. This is all internal and I have a one way trust (DomainB trusts DomainA). I have a list of users from DomainA in a CSV that I need to ...
0
votes
0answers
20 views

PSSession Access Denied Error

I try connect to from the machine psttest01 to the machine psttest02 with PSSession and certificates as authentication. For that I used this command: Enter-PSSession -ComputerName psttest02 -...
1
vote
1answer
39 views

WMI query ran in a Powershell console yields less results in 32 bits mode than 64 bits mode

This query gwmi -Class Win32_PerfFormattedData_NETFramework_NETCLRMemory gives fewer results if I run it in a 32 bits PowerShell console than in a 64 bits one. It looks like background processes, ...
0
votes
0answers
15 views

Stop Windows Backup from making Deduplication Exclusion for backup drive

With Windows Server Backup after every backup, the server puts an exclusion in the Deduplication list for the backup folder. Is there a way to stop this behavior? If not, is there a way to get ...
0
votes
0answers
16 views

Enable-VMResourceMetering sometimes fails in Hyper-V 2012 R2

I am trying to loop through and enable metering on all virtual machines that already do not have it enabled. It works most of the time but when it does not, I get the following unhelpful error message ...
0
votes
1answer
27 views

Invoke-DscResource against a resource without a module

On the current version of WMF5, I try and invoke a DSC resource using Invoke-DSCResource like so: $destinationPath="$env:SystemDrive\DirectAccess.txt" $fileContents="This file is create by Invoke-...