PowerShell is Microsoft's new scripting language in 2006, and significantly upgraded in 2009. It allows interpreted scripts based on PowerShell cmdlets and .NET primitives.

learn more… | top users | synonyms (1)

0
votes
1answer
75 views

List current Principals in group Managed Service Accounts

Is there a way to list the current list of all the groups and/or hosts in the PrincipalsAllowedToRetrieveManagedPassword property of a gMSA (group Managed Service Account)? There isn't any help on ...
2
votes
1answer
138 views

Drainstopping NLB via powershell remotely

This question was asked by a colleague on SO here, though it was suggested that we ask it here instead - apologies for the cross posting. Server is Windows Server 2008 R2 - UAC is disabled on the ...
0
votes
0answers
364 views

OpenVPN: Setting DNS & WINS servers to Windows client, without DHCP

I have a few Windows 7/8 clients connecting to a Linux OpenVPN Server (tap). I'd like to set the clients' DNS and WINS servers upon connection. The OpenVPN isn't acting as DHCP server; there is an ...
4
votes
2answers
111 views

How to force DSC to execute all configurations (Packages) even when a restart/reboot is required

From MSDN RebootNodeIfNeeded: Certain configuration changes on a target node might require it to be restarted for the changes to be applied. With the value “true,” this property will restart the ...
5
votes
1answer
148 views

DSC, how to know if after running the configuration a reboot is required

So I'm using DSC Push mode I have about 200 deployments per day to several environments (DEV/INT/QA/PROD) Every time that I deploy I want to make sure that each server is configured correctly So ...
9
votes
5answers
1k views

Powershell - Retrieve current domain user's full name

Using Powershell, how can I get the currently logged on domain user's full name? Not only its username. Thanks EDIT: without the need of the activedirectory module!
1
vote
2answers
115 views

Powershell Array - same location combining

I have a script that returns the following information Analog Phones IP Phones Location ------------- --------- -------- 0 883 Site1 413 0 Site1 0 ...
1
vote
3answers
86 views

Displaying all groups that a user from another domain is a member of

My team and I are stumped on this one. We have two domains at work, OldDomain and NewDomain. We are working on migrating from OldDomain to NewDomain as mandated by ParentCompany. The trust is one ...
3
votes
2answers
225 views

Can you use WMI to determine if a connection gets its DNS servers from DHCP?

The DNS server search order for a network interface can be read from Win32_NetworkAdapterConfiguration like this in Powershell, or programmatically using .Net ManagementObjects: > $NICs = ...
0
votes
0answers
110 views

Script to clean out old messages from Journal mailbox after exporting email to .PST

After using the following script to export email to a .PST file I'm wanting to clean out the Journal email box called "JournalMailbox": New-MailboxExportRequest JournalMailbox -FilePath ...
1
vote
1answer
60 views

Does Microsoft Exchange 2010 have two kinds of Distribution Groups?

I was told to add someone to a Distribution Group and when I ran: Get-DistributionGroup -ResultSize Unlimited | Select-Object -ExpandProperty Name from Exchange Management Shell I didn't the ...
1
vote
0answers
65 views

Enter-PSSession returns PSRemotingTransportException

When I try to connect to a distant server using Enter-PSSession, I have a PSRemotingTransportException. It says that the user is either unknown or associated with a wrong password. It works with ...
0
votes
1answer
171 views

Create network shared folder using Powershell on Windows 7

I need to create a shared network folder on windows 7 using PowerShell - I cant get access to New-SmbShare as this is for windows 8 and Windows 2012 Server - any examples would be great. Am I limited ...
0
votes
1answer
56 views

New-ADUser -Path syntax?

Where can I find a detailed explanation of the -Path parameter of the New-ADUser command? I want to specify a rather detailed path without calling Set-Location many times to specify where I want the ...
0
votes
1answer
51 views

Is it possible using powershell or batch scripting to change the meeting organizer for a lot of meetings in one go?

We have an exchange 2003 server, and now for one of my users I've created a separate mailbox for organising meetings for all users. Now I want to move all her existing meetings scheduled for all users ...
0
votes
0answers
37 views

Exchange powershell command set-MailboxJunkEmailConfiguration not responding

I recently needed to remove an address from the blocked sender list on an exchange 2010 server. No biggie I thought and tried it out using this command: set-MailboxJunkEmailConfiguration -identity ...
0
votes
0answers
54 views

Scheduled task deleting itself

I am using PowerShell to create scheduled tasks on my local machine, the Scheduled Task runs a PowerShell script to PowerShell remote into a server and copy files. When I run the Scheduled task using ...
3
votes
2answers
231 views

Powershell - Find users belonging to more than one AD group

I'm new to AD and Powershell so please forgive me if I use the wrong terminology. I have a series of 50+ Active Directory groups called "ABC-something". Every active user needs to belong to exactly ...
1
vote
2answers
492 views

Powershell scan for network attached printers

Currently I'm working on creating a PS script to scan a network and retrieve all of the Windows Servers, their product keys, SQL Server product keys, CPU, RAM, Network Shares and Services on all the ...
0
votes
0answers
58 views

ssh from osx to windows server: how to increase buffer size?

I need to allow mac users to connect to a Windows Server 2008 machine via ssh. I am using freesshd as my ssh server, and have set powershell.exe as my command shell in freesshd (so that they can use ...
0
votes
0answers
53 views

Server migration with a lot of IIS websites - done with PowerShell

We are migrating our last physical machines to virtual machines. Some servers have a lot of IIS websites running. In the past the IIS migration was done manually, but now I would like to use the ...
0
votes
1answer
200 views

StartTime and EndTime params ignored in Set-MailboxAutoReplyConfiguration (Exchange 2013)

I'm using the following command: Set-MailboxAutoReplyConfiguration -identity “First Last” -AutoReplyState enabled -StartTime '3/3/2014 00:00:00' -EndTime '3/8/2014 00:00:00' -InternalMessage ...
0
votes
0answers
61 views

Exchange - setting folder policy with powershell

In Exchange Server 2010, there are known limitations for applying default retention policies to the Notes folder. The work-arounds I found indicate that users should manually set the retention policy ...
-1
votes
1answer
196 views

DNS Record - CHange Current Owenership using Powershell

In DNS I have some computers in the list where the current owner no longer exist so you see the sid info as the Current Owner. I like to change this to the machine_name$. Anyone know how to do this ...
2
votes
2answers
130 views

Providing Read-only permissions to mailbox in Exchange 2010

I need to provide read access to a user in Exchange 2010. No matter how many different variances of the PowerShell I use I get a "Could not expand the folder" error in Outlook, and "Your mailbox ...
1
vote
1answer
64 views

powershell: How to pass this string to an exe

Powershell can't seem to parse this correctly: mysql.exe '-uroot -p123 DB < c:\test\DB.sql' I also tried this: Start-Process mysql.exe -arg '-uroot -p123 DB < c:\test\DB.sql' Edit: Well ...
4
votes
4answers
208 views

Is it possible to disable msiexec help GUI?

I'm automating unattended retrieval & installation of specified .msi packages with a powershell script but if the command is invoked with syntax errors the msiexec will wait indefinitely for an OK ...
0
votes
1answer
77 views

How to automatically create a Hyper-V VM and install an app using PowerShell

I am designing a testing infrastructure for a WPF application. I want a system that will create a VM when a new MSI appears in a folder, and install the MSI on the newly created VM. I am using Hyper-V ...
0
votes
2answers
527 views

“HP Insight Management WBEM Providers” download

I am trying to query a Proliant Server's health thru Powershell. But I can't find a place to download the HP Insight Management WBEM Providers from here. Is there any other Powershell equivalent of ...
0
votes
0answers
38 views

Exchange 2010 Blocking Twitter

I am responsible for a windows network with an Exchange 2010 server. It appears that we haven't been receiving twitter emails for quite sometime, maybe even as far back as just before ...
0
votes
1answer
337 views

Office365 Published Room Calendar shows everything as “Busy”

I am trying to allow people from outside of our organization to properly watch one of the Room Calendars. I managed to successfully publish it using this powershell command: ...
0
votes
1answer
73 views

Powershell - query non-standard group members in an OU?

I am looking to create a script which will only show users in an OU who are members of "non-standard" groups. For example, all users in the "Accounting" OU will be members of at least one group with ...
2
votes
2answers
1k views

Powershell: Single Script to “clean” multiple folders of files older than

I would like to create a maintenance script that would run on each of our servers to clean out common drop/archive directories. Preferably the script would use a reference file for the folder path ...
4
votes
2answers
91 views

OK to modify HKLM\Software\Policies and HKCU\SOFTWARE\Policies on a domain?

Background: I have a domain (2003 Functional Level) with a mix of Windows XP and Windows 7 clients. We have been using Group Policy to manage our workstations. Now, I am in a situation I need to ...
1
vote
2answers
1k views

Cannot get Exchange PowerShell script to run under Scheduled Tasks

I have a PowerShell script that works when entered directly into the PowerShell. The PowerShell program is run with the shorcut: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe ...
1
vote
1answer
1k views

Passing arguments to a Powershell Script using Nagios NRPE

Short powershell script for testing: $test = $args[0] echo "this works" echo "I transferred $test" exit 0 nsclient.ini settings: # If you want to fill this file with all avalible options run the ...
0
votes
1answer
71 views

Understanding PowerShell piping/filtering with cmdlets

Consider the following PowerShell commands around failover clustering: Get-ClusterGroup "UKMAC-XA54" | Get-ClusterResource The first cmdlet returns a single ClusterGroup object with the fields ...
0
votes
0answers
46 views

mail routing connection testing

I would like to implement an alerting process that will send a test email to an internet based mail server every 5 minutes, I manually email echo@esat.net if I suspect there is a transmission issue ...
3
votes
1answer
219 views

Why am I getting unauthorized errors with Powershell get-winevent?

I'm a domain admin equivalent, I've tried running in an elevated console (right-click> run as administrator), and I'm consistently getting errors when executing get-winevent -logname application | ...
3
votes
1answer
892 views

How to install PowerShell 3.0 or 4.0 via WSUS

I can't seem to find any information about Windows Management Framework 4.0 on WSUS. As far as I can tell it's not available for approval or download in WSUS, and it looks like Windows Management ...
3
votes
1answer
786 views

How to Export a Registry HIVE (NTUSER.DAT) in PowerShell

In order to resolve a registry bloat issue caused by Samsung Print Drivers I'm needing to find a way to Export a user's Roaming Profile NTUSER.DAT Registry Hive while in PowerShell. Loading and ...
0
votes
0answers
90 views

Exchange 2007 PowerShell - Run and email weekly report (.txt) automatically

I've found numerous codes online and have created the following to run a basic report on quotas and sizes of mailboxes on our SBS 2008 server (Exchange 2007): get-mailbox -server HYDROMAIN ...
1
vote
0answers
29 views

Why is $job.LastRunOutCome always “Failed”?

I am using sqlps to run a backup job "Backup Something". Set-Location "SQLSERVER:\sql\$hostname\default\jobserver\jobs" $job = Get-ChildItem | Where-Object {$_.Name -eq "Backup Something"} ...
0
votes
1answer
140 views

HTML not displaying correctly in email sent with PowerShell

I have a script which displays disk space on all servers on a HTML page and side by side sends email from the content of the HTML file saved. The HTML file is perfect, and the email displays the ...
3
votes
1answer
103 views

Change shortcut arguments via script

We have a program here that requires every user to have a shortcut on their desktop that points to an ini file. Each file is unique to the user. Recently, we've done a new install of the application ...
1
vote
2answers
61 views

Confirmation of PowerShell behaviour on arrays

Consider the following small script: $a = @(1,2,3) #1 $b = $a #2 $a[0] = 101 #3 $b += 99 #4 Write-Host "a: $a" Write-Host "b: $b" The output is this ...
5
votes
0answers
234 views

Set-RDSessionCollectionConfiguration Connection Broker connects to localhost

I am running the following command from a PowerShell console on a Windows 8 machine, trying to configure a Server 2012 R2 RDS Connection Broker: Import-Module RemoteDesktop ...
2
votes
1answer
651 views

Delete an individual user profile from Office 365/Sharepoint Online MySite, using Powershell

I'm trying to work out a process that would allow my helpdesk to delete an individual user's profile from Office 365 sharepoint online using powershell. It's easy to connect to our Sharepoint Online ...
-2
votes
1answer
167 views

What can't be done in Powershell [closed]

I'm preparing a quick presentation on the possibilities of Powershell management in Windows 2012R2, versus GUI-based administration. Now, I'm trying to pin down what administrative tasks typically ...
0
votes
0answers
70 views

Windows Task Scheduler Option “Do not start a new instance” runs a second instance of my script, known bug?

I am using a small powershell script which checks the ram and disk usage , just some metrics. This script sleeps for 15 seconds and then runs again. Only 1 script is triggered and this should kept ...