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)

4
votes
1answer
308 views

Search-ADAccount :: Finding Inactive, Disabled or Expired Accounts

The Search-ADAccount cmdlet has switches -AccountDisabled, -AccountExpired and -AccountInactive; the results of which may not be mutually exclusive nor inclusive. i.e. an account which was disabled ...
0
votes
2answers
39 views

How do you edit a Powershell script to continue on an error?

I modified this script(https://gallery.technet.microsoft.com/scriptcenter/Create-HTML-Uptime-and-68e6acc0) to hit multiple servers, but it doesn't generate a report even if only one of the systems are ...
1
vote
1answer
45 views

PSTerminalServices returning no details about session

I am connected to a machine using RDP but when I call the following (using PSTerminalServices via powershell): get-tssession -computername thecomputer I get: Exception calling "GetSessions" with ...
1
vote
2answers
204 views

Set NTP server on all AD members (old and newly connected) using w32tm or PowerShell?

I am looking for a PowerShell script that I run one time only on the DC. I found w32tm but I don't know how to use it. Thanks in advance!
3
votes
1answer
275 views

Can vSphere PowerCLI cmdlets execute from a PS1 file?

I'm looking to write an admin script that will: Delete a VM from vSphere Delete the VM's DNS entry Release the VM's IP address with our Windows DHCP server I can accomplish the first item via ...
3
votes
0answers
49 views

Besides looking dumping $PSVersionTable and dumping the variable and env “PS-Drives”, what else can I do to compare PowerShell environments?

Besides looking dumping $PSVersionTable and dumping the variable and env "PS-Drives", what can I do to compare PowerShell environments? Here's the problem: I have very similar machines running ...
1
vote
0answers
138 views

“Please Wait” When running startup script, only on Windows 8.1

I have a startup script and I have been testing it on 3 different virtual machines. These machines are running different versions of Windows(7, 8, and 8.1). They all have the same Group Policy applied ...
0
votes
2answers
24 views

Setting to Show/Hide Hidden items on a Folder

Where is the setting to display or not display hidden items on a particular folder? For example, if the global setting is to show all hidden files, how would I change the seeing on the Desktop ...
0
votes
2answers
106 views

Generate List of IP's With User Names On Windows Network

We recently setup GFI WebMonitor on our network which is giving me back IP's instead of User's. I'm in the process of determining whether we will be able to implement authentication on the proxy to ...
1
vote
1answer
116 views

How can i create an install a domain signed certificate in IIS using PowerShell?

In my environment we host a whole lot of websites and WCF webservices in IIS (on Windows 2008 R2 and Windows 2012). We are in the process of enabling HTTPS on these sites. This goes as follows: ...
1
vote
1answer
56 views

Setting HomePath to EmployeeNumber as a variable

We are planning to use the EmployeeNumber user attribute in AD to create the path to each user's Home drive. Reason for this is that AD user names are currently based on last name, which changes often ...
4
votes
1answer
97 views

Win32_OperatingSystem.FreePhysicalMemory and $_.TotalVisibleMemory giving output in wrong units

I've been putting together a pretty simple script to monitor some aspects of our Terminal Server farm usage and am implementing a section where I check the memory usage on the servers at a given point ...
1
vote
0answers
172 views

Powershell execute Queries using SQLPLUS

I have a RHEL server with Oracle 10G installed. I need to write a powershell script to query my database and get the output. I have imported Posh-SSH module and am able to connect to my RHEL server ...
1
vote
1answer
81 views

How does SCSM Relate Affected Users to Service Requests?

I'm using the built in SCSM cmdlets and the SMlets powershell module. I'm able to query Service Requests, but I can't seem to figure out how to get the Affected User of a given Service Request. I'm ...
0
votes
0answers
64 views

Windows PE: Powershell is not installed & error 0x80070002

Trying to run a task sequence. In the last step, I'm trying to run a powershell-script to install various IIS-features. At this step the task sequence terminates with an error (can't remember error ...
1
vote
1answer
59 views

Powershell DSC uses the incorrect certificate file for encryption where node names partially match?

I think there's a bug in the way that DSC chooses the certificate file that is used for credential encryption, such as with the Service resource and a PSCredential. The DSC configuration uses the ...
1
vote
1answer
44 views

Powershell: Pass parameter by name toa com object function

How can I pass parameters to a com-object function by name rather than by position? Specifically, I've a com-object function (Word document com-object SaveAs2) and for example I want to pass values ...
0
votes
0answers
57 views

Access denied while settings FSRM quotas with powershell

I'm trying to set size quotas on the users personal directories in the organization. When using the Gui (fsrm snap-ins), everything works as expected. When trying to use powershell cmdlets to ...
2
votes
1answer
607 views

Get-ADUser -Properties MemberOf returns nothing

Something that is kind of weird that I haven't ran into before. We just did a domain migration and so now when I run a Get-ADUser {username} -Properties MemberOf against a standard user the MemberOf ...
1
vote
1answer
25 views

Large number of unmanagable groups in Exchange 2010 following migration from Exchange 2003

Recently we migrated from Exchange 2003 to 2010, and now we have many groups greyed out in the 2010 Exchange Management Console, because they are not Universal Groups. While these groups are ...
0
votes
0answers
36 views

Is it possible to create my own custom SQL 'trigger' with Powershell?

I'm familiar with MSSQL triggers already, however they aren't fine grained enough for what I want to do. In my scenario I want the trigger to fire after a row containing certain information lands in ...
1
vote
1answer
58 views

Using reflection in Powershell with different .NET framework versions

I am trying to reflect some assembly attributes from a .NET assembly. I am using Powershell 2.0, but the assembly was written using .NET Framework 4.5.1, so when I try the following command: ...
6
votes
1answer
137 views

How can I modify an existing scheduled task using Powershell?

I am working on some release automation scripts that use Powershell to update existing scheduled tasks which execute various applications. In my script, I can set the Path and Working Directory of the ...
0
votes
1answer
56 views

Powershell - Using a WHERE clause after an @{name alias not returning anything

Can I not use a WHERE in the pipe after an @{name alias? I have to use custom column headers in my output so I am using the @{name syntax. Later in the pipe, the sort works using the alias I've given ...
0
votes
1answer
121 views

Powershell: invoke-expression with “find”-command

I need to call DISM.exe via its absolute path which changes dependent on system architecture. Therefore, I store the filepath of dism.exe in a variable and then proceed to execute the wntire command ...
0
votes
2answers
78 views

Static IP injection to guest VM in Win2k8

Is there a way to inject IP address and do network configuration of a CentOS VM running on Windows server 2008? In Win2k12 there is SetGuestNetworkAdapterConfiguration using which IP address can be ...
0
votes
0answers
25 views

EventLog Source “Connect”. No events in EventLog

I'm baffled by this, as I can find no documentation on wether or not "Connect" or "Connection" is some kind of registered keyword for EventLog Sources. I'm trying to create an EventLog Source called ...
2
votes
0answers
35 views

Deploying Server 2012 with DNS role using WDS and answer file

I want to deploy an image using WDS on Server 2012. I will be using an answer file for unattended installation with little touch as possible. My answer file works great but I can't get the auto-logon ...
0
votes
0answers
82 views

Exchange 2013 Powershell: Setting up Public Folder Mailbox in multi-tenant topography

My exchange system has multiple habitats/tenants (i.e. domains). How do I set my public folder mailbox system? Do I set one up for each habitat (tenant)? If so, what is the syntax? Or do I set one ...
0
votes
1answer
61 views

CloudFormation powershell to run as domain admin + elevated priviledge

So... I'm writing some cloud formation templates. Using cfn-init, I get the machine to join the domain, and now I need to run in a Domain Admin context as local admin with elevated privilege to: ...
0
votes
1answer
42 views

Allowing multiple executables into a “Run only specified applications” group policy at one time

At my workplace we whitelist executables using a "Run only specified Windows applications" group policy applied to the domain. At certain times we need to whitelist large number of executables at a ...
1
vote
1answer
125 views

Some groups show no members in Get-ADGroup

So I have a question about strange PowerShell behavior with Get-ADGroup. If I use it on a group I created, I can get members just fine. But on some (not all) built in groups, including Domain Users, ...
2
votes
4answers
178 views

Different group policies in one domain

I'm using powershell to display the password expiration of an account before I reset it at work. But the global GP from what I can see, is 180 days, and there are some employees who have 90 days set ...
1
vote
1answer
165 views

Allow Enter-PSSession to work from local systems account

I have a PowerShell script that creates a Windows PowerShell session (PSSession) on a remote server via Enter-PSSession, both servers are not connected to a DOMAIN. This script is called from a ...
0
votes
1answer
36 views

Need looping Powershell script to email me when site has error message [closed]

Running 08 windows server on a VM We need to be notified by email or by other means whenever the site is either 404 or goes to maintenance page. Therefore, we need the script to be constantly ...
1
vote
1answer
635 views

Windows 2012 R2 RDS - can't change Connection Broker DNS round robin name via Powershell

I'm running into an issue when setting up a Windows 2012 R2 RDS Farm. I mistakenly set up my High Availability Connection Broker's DNS round robin name to something that didn't match my cert. I ...
4
votes
2answers
405 views

Install - Import PFX Certificate to separate local account's Personal store - Automated

I've been wrapping my head around automating a way to perform this task: We deploy Windows Server 2008 R2 images for our customers. We use PowerShell (version 2) to deploy our proprietary software ...
-1
votes
2answers
50 views

Prevent windows users from logging into, pinging, or browsing other workstations [closed]

Bluecoat security did an analysis of the Sony attack and says the following "This particular sample highlights the value of a network architecture where workstations cannot talk to each. While ...
3
votes
3answers
73 views

PowerShell: How to retrieve a specific property _exclusively_

How can I retrieve a specific property exclusively? I am aware of the select-object cmdlet which seems to be dowdy in that respect: PS C:\> Get-ADOrganizationalUnit -SearchBase ...
1
vote
3answers
413 views

Powershell Start-process -Argument list not working

Start-Transcript c:\scripts\InstallUpdates.log -Append # -NoClobber $SourceMSUFiles = (get-content install-list.txt | where {$_ -like "*.msu"}) #Install MSU files foreach($file in $SourceMSUFiles) { ...
4
votes
1answer
84 views

Look on all server desktops for outstanding files before deleting profiles

We have about 70 servers that we are in the process of moving into a domain environment, so we are converting our users from local accounts to domain controlled accounts. How can we determine which ...
0
votes
1answer
95 views

Dump user's Exchange mailbox to explorer while retaining folder structure

I have a user who will be retiring in a few days. He's been tasked with dumping out all mail that is related to the organization's customers and classifying it under our organizational structure ...
0
votes
1answer
142 views

WDS - Initial configuration using PowerShell

I am installing WDS on Windows server 2012 R2. I want to use PowerShell from start to finish. I can install the feature, but I cant't find a way to do the initial configuration from the shell. This ...
0
votes
1answer
101 views

Windows Server 2012 RD Licensing Issuing Multiple Temp Licenses Per Machine

I have just setup a Windows Server 2012 RDS environment with Per Device CALs. Looking at RD Licensing Manager it is handing out multiple temp CALS per machine and multiple permanent CALS per machine. ...
0
votes
1answer
89 views

Need to embed an existing object inside a PSObject

I have a module that does a "get" and returns some information from a VMware host. All the return information is in a NoteProperty. I'd like to add in an type into that PSObject so that I can pipe it ...
1
vote
2answers
90 views

Getting no query results in email

This is the powershell script below. I am trying to export the query's results into email body. However, the email contains nothing except the table headers. Could anyone help out what could be wrong ...
-1
votes
1answer
73 views

Running powershell like a process to monitor for event changes

I would like to have powershell manage network profiles for me depending on where I connect to. Mostly for my three work locations I jump between. I need specific IP off the wireless networks so I can ...
0
votes
1answer
38 views

interpret unknown piece of powershell related to SQL Server

I am migrating from SQL 2008 on Win2003 to SQL 2014 on Win2012. One of the jobs from the old system has this step: if ('$(ESCAPE_SQUOTE(INST))' -eq 'MSSQLSERVER') {$a = '\DEFAULT'} ELSE {$a = ''}; ...
1
vote
3answers
105 views

How to change windows time server on windows server 2012?

In windows computer, system is using "time.windows.com" to sync the time. I need o modify the time server for windows user on its logon and want to enforce using group policy. Case: we have windows ...
0
votes
1answer
73 views

Assigning Department based on Active Directory OU's

We have just gone to Office 365 tied in with ADFS. We want to be able to see people's departments automatically when we view their contact info in Office 365. We do not have any Department ...