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
2answers
32 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
92 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
145 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
54 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
72 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
71 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
31 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
85 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
42 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
140 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
28 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
26 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
34 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-...
0
votes
0answers
43 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
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
59 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
23 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
38 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
63 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 ...
0
votes
0answers
21 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, ...
1
vote
0answers
22 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
22 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
31 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-...
-3
votes
1answer
55 views

script to know application pool,bindings [closed]

Do we have any powershell command or powershell script to get the website details as website name, application pools associated to,.Net version,bindings mapped to website. do we have a single line ...
1
vote
2answers
90 views

Azure Powershell - Change Directory

When I login to the new Azure Portal I see a drop-down at the top right that lets me select a "Directory" from a list of 2. When I login to azure using powershell cmdlet "Login-AzureRmAccount" I am ...
1
vote
0answers
20 views

dsc local configuration manager email me whenever change occurs

I'm running DSC with ConfigurationMode set to "ApplyAndAutoCorrect" It works fine as it is fixing any issues withing 15 minutes which is default. I would like to get notified by any means whenever ...
0
votes
1answer
53 views

Powershell: Executing Base64 commands returns error?

I need help with a simple test case of executing a CLI command through PowerShell which has already been encoded in Base64. Suppose Get-ChildItem has been converted in advance to Base64 string ...
2
votes
1answer
121 views

A non-recoverable error occurred during a database lookup

Short version: Why does Test-Connection report "A non-recoverable error occurred during a database lookup" for an offline host on a different subnet? I'm using PowerShell to ping a remote host with ...
0
votes
1answer
82 views

Azurerm powershell Cannot bind parameter and Cannot convert the value

even I can see the virtual network still can not get the specific virtual network subnet info from Azure powershell1.4.0. PS C:\Users\mwang> Get-AzureRmVirtualNetwork |more |Select-String name |more ...
0
votes
1answer
41 views

WinRM-Service is running but can't be reached

I have a virtual testing environment for developing scripts. As .NET isn't capable of all the possibilities PowerShell offers I use Remote PowerShell Runspaces. My problem is now, that I can't reach ...
0
votes
1answer
23 views

set the screenbuffersize of powershell console using cmd

For powershell version: 2.0 and 4.0 Is there a command used set the screenbuffersize of powershell console? I need to set the property of powershell console, not default size. I have tried the below ...
0
votes
1answer
81 views

Powershell Abbreviations?

I have a question about how PS abbreviates various commands, particularly when initializing a PS session. Let's assume we're starting at a Windows DOS Prompt: C:\> powershell -exec bypass I ...
0
votes
1answer
18 views

Create a backup on a remote share using Powershell

I have a backup script that is supposed to target a specific local folder and backup the folder to a remote shared folder on another server. When I run my script, Powershell prompts me with the ...
1
vote
1answer
38 views

Get all emails sent to particular email address and not the mailbox (alias')

I'd like to see all emails sent to a particular email address rather than the full mailbox with all alias'. e.g. if bob@example.com is the primary email address and bob@example2.com is an alias, i'd ...
0
votes
1answer
56 views

Check `Restore on AC/Power Loss` from CMD/Powershell on windows 10

I've set the Restore on AC/Power Loss from the windows Bios menu on computer startup for a few Windows machines. How can someone confirm (remotely) that I have done that, is there a way to do this ...
-1
votes
1answer
42 views

Powershell script to take and delete snapshots

Im new to powershell and i want to create a script to take a snapshot of all the running vm's and delete the snapshots that have more than lest say 5 days. What i have is this: $Time = 5 $VMs = Get-...
1
vote
1answer
41 views

set-aduser inside foreach loop

I'm trying to get the below script to change three things on an AD account. I want it to expire the account, change an attribute, and append disabled account to the current description. It does ...
0
votes
0answers
18 views

Retrieve VM information from VCloud

In a development shop, we have a large number of VMs with complete installations of our applications, with client, server and database VMs in a single vApp. The people who create the VMs do not keep a ...
1
vote
1answer
33 views

Get bool return value when checking if smb1 is enabled using powershell

I can use Get-SmbServerConfiguration | Select EnableSMB2Protocol to get table style result: How can I get bool result which in this case would be False I'm working on DSC, and currently ...
0
votes
1answer
64 views

script parsing results to the same email

I am outputting the results of a powershell script to a html file which is emailed to me via exchange, I need to get the script to stop parsing the results to the same email and create a new email on ...
0
votes
0answers
126 views

EC2 Cloudformation - userdata using powershell to retrieve powershell scrips from GitHub

I have a AWS cloudforamtion - whih build my entire VPC with subnets etc - within this CF builds a windows 2012 server - we want to bootstrap this server under user data so it become a domain ...
3
votes
1answer
144 views

What is the supported way to check where my managed service accounts are installed?

I created a managed service account (not a gMSA) and installed it on a 2012 server with Install-ADServiceAccount. Now I want to be able to check where my MSA are installed (throughout the domain) ...
0
votes
1answer
116 views

Assistance with writing PowerShell script to search Active Directory for a machine name

I'm writing a script to automate some AWS-launched Windows server instances. I've got the DNS changes, and the join-domain part okay, but I'm having trouble iterating the namespace...for example; ...
0
votes
0answers
79 views

Access denied when running some remote PowerShell commands

I have configured WinRM (PowerShell Remoting) on four machines that I administer. On all machines but one I can run both of these commands remotely with no issue. On one cursed machine, Get-Command ...
-2
votes
1answer
35 views

Windows domain list users details where password never expires [closed]

I have a Windows domain, where I need to find users with option to never expire password enabled - as a part of an audit and for contacting them. I have no rights to install any fancy Powershell parts ...
-4
votes
1answer
49 views

Built-In PowerShell Module Path

I'm trying to figure out where the built-in modules are hosted in the filesystem. I would've thought it an easy task, but I'm not having much luck. Most/all of the Google results are about getting the ...
5
votes
1answer
64 views

Get witness disk current vote via PowerShell

I am trying to verify functionality of dynamic quorum in a new failover cluster setup. Is there a command in PowerShell that I can use to see the current vote for the witness disk? I have been ...