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
11 views

Evaluating nested groups in Powershell expression

I have a management scope and management role assignment set up which allow a service account to impersonate Exchange mailboxes belonging to users in a specified distribution list. I set up the ...
2
votes
0answers
11 views

Powershell Download via HTTP using Proxy and Checking Remote File Size Fails on Second File

I have a powershell script I'm developing, which will download files from a HTTP server going through a proxy and including a UN/PW on the server. I have files downloading fine, but some files are ...
2
votes
1answer
16 views

What it means when PM(K) of ps gets negative values?

I got the following negative PM (The amount of pageable memory that the process is using, in kilobytes) values when execute the ps command. What it means when the values are negative? PS H:\> ps ...
0
votes
0answers
12 views

novell ndir alternative for x64bit windows 7 [on hold]

I am trying to get the owner of a file in a novell file share, however when i try to run ndir it gives an error because ndir is x16 exe and i am using a x64 windows 7 machine. Is there an alternative ...
5
votes
1answer
37 views

How to get SCCM to recognize return codes from Powershell script completion?

I'm using an SCCM 2012 application deployment to install software. The specific install type is scripted installer as SCCM kept failing for exe validation errors. The script is powershell and ...
0
votes
1answer
32 views

How to show powershell input as part of output

I'm trying to get the OS version of a selection of the computers on my domain. I created a powershell command that does this but it is missing the computer name on the output. This is the command ...
1
vote
2answers
25 views

Windows Server 2008 send an alert using Powershell

I want to send an alert with Powershell. But I want to know if there is another way to send an alert, other than email. Thanks. P.S. I can't send emails because I don't have an smtp server, and due ...
2
votes
1answer
21 views

Configuring DHCP server (Win 2012)

I am trying to do some basic testing of a DHCP server (Windows Server 2012). I'm trying to do all this testing from a laptop. The VM's are set Host-Only (or 'Private to my Mac' setting) To get ...
4
votes
1answer
27 views

How to suppress error text with Get-DhcpServerv4Lease

I have a simple script to look through an IP range in DHCP and report all the addresses that don't have leases. There's a function that supposedly does this already, but it doesn't seem to work for ...
0
votes
1answer
39 views

GidNumber Powershell?

I see someone posted this small script for assigning Gid's but unfortunately im getting an error. I modified it a bit to better fit my needs but was wonder what the $groups variable meant in it? ...
0
votes
0answers
21 views

Building bootable iso using mksisofs

I'm trying to build bootable linux ISO under windows using mkisofs this is the command I'm executing: mkisofs -r -V “Modified Iso” -o D:\MOR.iso -cache-inodes -J -l -b isolinux\isolinux.bin -c ...
0
votes
1answer
37 views

How can I get VMHost's operating system and serivce pack info using Get-VMHost

I am trying to get the VMHost operating system info , but I can not find the required scripts. I tired this :- Get-VMHost which return a lot of info about the VMHost,, but the operating system ...
0
votes
0answers
15 views

Unable to get the DHCP server + NIC using “Get-VMHost <hostname> | Get-VMHostNetworkAdapter -VMKernel”

I run the following command inside my powercli 5.5 release1:- Get-VMHost <hostname> | Get-VMHostNetworkAdapter -VMKernel where I got these info :- VMotionEnabled ...
2
votes
2answers
40 views

Want to Export-CSV variable with properties

I want to build a "~table" that holds information about various computer (e.g. Name, IP Address and MAC Address though more information could be added later). Here is what I have so far: $Computers = ...
0
votes
1answer
40 views

Compare three directories with powershell [closed]

Wanting to compare 3 DFS directories. helios456 wrote a nice script for two directories, I have tried modifying to fit my needs but have hit a brick wall. Winmerge, Beyond Compare and diffmerge only ...
-2
votes
0answers
11 views

Matlab fail to import a file after edit using Powershell [closed]

i have a big problem, after i edited hundreds of files using the Skip command in PowerShell windows 8, i tried to import them to matlab and matlab said it cannot read the data, even though the file ...
0
votes
1answer
51 views

Windows Server 2008 Send an email on reboot

I want to send an email when a Windows Server reboots or shutdown unexpectedly. I was reading that one way to achieve that is look for event id 6008 on System's log, and then send the alert. What ...
1
vote
1answer
15 views

unable to get the IP,Mac, and other network info using (Get-VMHost).NetworkInfo

I am using powerCLI verion 5.5, and I wrote the following script:- Get-VMHost |Export-Csv -Path c:\test.csv -NoTypeInformation –UseCulture I got info for the vmhost such as used memory, build, ...
2
votes
2answers
36 views

Powershell to add printers based on AD Site

I am trying to map a default printer based on the location found in AD Sites and Services. I can grab the location of the computer using ...
1
vote
1answer
25 views

user authentication with powershell

I have the following simple script which I'm using to push some files to a number of Win7 and Server2008 machines. In most cases the local user has no password. However the scripts fails because I'm ...
1
vote
2answers
24 views

How to ONLY get property value

I want to retrieve IP Addresses from computer names but I ONLY want the IP nothing more. $computer = 'Server1' $computer = [System.Net.Dns]::GetHostAddresses($computer) | select IPAddressToString ...
0
votes
1answer
25 views

Can't see my Azure VMs listed in PowerShell

Whenever I try to get a list of VMs I have running in Azure, they aren't showing up when I use PowerShell to list them. I know they are they exist because I see them in the portal but when I connect ...
0
votes
1answer
31 views

Connecting to Azure with PowerShell

How do you connect to Azure with Powershell? I'm specifically referring to the Service Manager system, not with Resource Manager. Also, does it make more sense to use certificates or connect with a ...
1
vote
1answer
24 views

Combine/consolidate entries in array [closed]

I have a script that takes a snapshot of AD groups and check against current AD state for membership changes. It adds psobject to an array and outputs a table to a html file. the problem is i want to ...
0
votes
1answer
32 views

Accessing Reverse Lookup Zone PTR records

I want to know the right command to get and delete PTR records inside the ReverseLookupZone using PowerShell. I couldn't find the right command to access the Reverse Lookup Zone. Can you guide me, ...
0
votes
1answer
30 views

Reset AD expired password with user credentials using a PowerShell script

there! I am new to Powershell and I need some help with this script. I have just began to work helping our sysadmin with some tasks inside a Windows Server 2008 R2 AD Domain environment. I am trying ...
2
votes
3answers
95 views

Run shell command on Azure Linux VM from PowerShell

I have a Linux server on Microsoft Azure. It's an Ubuntu 14 Server. Apparently, I've done something wrong with the UFW (firewall) configuration and now I can't ssh into machine at all. I need to ...
5
votes
1answer
165 views

Possible to use Powershell to detect if an HP server has a bad drive?

I'm trying to use Powershell to detect certain hardware failures. Can Powershell hook into normal HP events/logs/alerts to detect if a drive failed?
1
vote
1answer
30 views

New-ADGroup with Multiple -OtherAttributes?

Keep getting "The Paramater is Incorrect" I think im following microsofts method correctly but its not working, any help is greatly appriciated. New-ADGroup -DisplayName $name ...
0
votes
1answer
37 views

Create Outlook rule via PowerShell

I'm looking to create a PowerShell script that creates an Outlook rule which delays any email sent out by one minute. I have very limited PowerShell knowledge and cannot find much information on ...
1
vote
1answer
22 views

Trigger an update with Azure PowerShell DSC Extension

I'm using the DSC Extension in Azure to configure the VM's and on first deployment that works fine. However, if I've made an error in the DSC script or need to amend it I am having trouble ...
0
votes
1answer
32 views

How do I filter Exchange 2013 new-moverequest by “StatusDetail”

I am trying to make a report of "interesting" moves, errored, lagged, or slow. I'm starting with this Get-MoveRequest -ResultSize unlimited | where {$_.status -ne "Completed" -and ( ( ...
1
vote
1answer
19 views

Powershell: PSScheduledJob for non-admin

Is there a way for non-admins to use the PSScheduledJob module? For example, I tried Register-ScheduledJob without admin privilege, but it returns "Access is Denied" error. We know that we can allow ...
2
votes
2answers
46 views

PowerShell to remotely invoke Exchange with other credentials

I've been tasked with creating a script that is going to be run on multiple user machines throughout the network. The commands that we're ultimately going to have run will change the user's email ...
3
votes
2answers
81 views

Can't Get PSExec to work with Powershell

Last week I developed a script that would check if psremoting was enabled on specified machines. This week I began working on a script that would enable psremoting on specified machines but I can't ...
1
vote
0answers
23 views

Running apps on remote machine using current user credentials

I'm using enter-pssession to connect to a remote machine via Powershell. I then try to run an application via this connection on the remote machine. However, when I do this, it believes the user is ...
0
votes
0answers
18 views

Hostednetwork rejecting connections after a while

I am trying to use netsh hostednetwork to host a wireless network. The problem is that after a while (1 hour - 14 hours) noone is able to connect and already connected people get disconnected after a ...
7
votes
3answers
216 views

PowerShell - Install-WindowsFeature (and family) missing on Windows 10?

We have some Powershell scripts used to set up various dev/test/prod environments and one of them installs and configures IIS. Unfortunately these scripts don't appear to be working under Windows 10 ...
0
votes
1answer
41 views

How to extract specific emails from Exchange Online using PowerShell and move or sort them?

In Exchange Online (Office 365), I need to extract emails, from particular sending addresses, from a handful of user mailboxes, to another user mailbox folder. I've been reading about the ...
0
votes
2answers
54 views

Accept Value From Pipeline Powershell Function

I would like to create a script that tell the user whether or not PSRemoting is enabled on multiple remote machines. Here is what I have so far: function Test-PSRemoting { Param( ...
1
vote
1answer
24 views

Get-VMHost does not show the server Networkinfo and number of processes

I run the following powercli 5.5 command , to get info about a host vm :- Get-VMHost |Export-Csv -Path c:\VM.csv -NoTypeInformation –UseCulture and I got these info :- State ConnectionState ...
0
votes
1answer
23 views

Unable to connect to server using its name “Connect-VIServer ”

I wrote the following PowerCLI command to connect to a server by its name :- Connect-VIServer -Server "t***.v****ces.intra" -User root -Password "*****" but I got the following error:- ...
1
vote
2answers
65 views

Why is there no 'powershell' tab in the group policy scripts dialog?

I would like to run a powershell script at startup but there is no 'powershell' tab on the dialog box. I am running Windows Server 2008 64-bit. Thanks!
0
votes
1answer
22 views

Connect-VIServer will always propt a dialog to enter username & password

I rung the following command inside powercli 5.5:- PowerCLI C:\> Connect-VIServer -Server 172.16.20.101 -User root -Password **** but I got a dialog to enter username and password although I am ...
0
votes
0answers
26 views

Map USB External HD to Hyper V Server 2012

I wanted to attach a USB external HD to one of my VM. I got Hyper-V Server Core 2012 R2. So I was about to follow any guides on internet (like this one Accessing USB Drives in a Hyper-V VM ), but I ...
0
votes
1answer
31 views

Accounts suddenly expiring when created with 'NET USER /ADD /expires:NEVER'

I'm using the following command in a PowerShell script to create new local user accounts. The account is created successfully, the correct password is set and I can logon to it fine. NET USER ...
0
votes
0answers
44 views

How to export SQLCMD output to Excel

I am using SQLCMD command in powershell to run SQL scripts. When i pipe the output to TXT ,the formatting is all messed up. i want to export the results to excel file. how can i do that. My command ...
0
votes
1answer
33 views

Powershell script from DFS server not running

I have an application in a Citrix/2008R2 that is acting as a user starting point for other apps. I have recently had to modify this application to integrate it more deeply with active directory. As ...
2
votes
1answer
45 views

Trying to get a second parameter in my PowerShell function to work

I have a Function I am working on to pull DisplayName and UninstallStrings from a remote computer's registry. If I only use "$software" parameter, it works fine for my local PC. But, if I add the ...
0
votes
0answers
27 views

Issues with Get-WinEvent running in remoting session

Looks like below code does not work $EventLogonIDs="4611","4624","4625","4634","4647","4648","4672","4774","4775","4 908","4964" $MultipleIDLogEntries={Get-WinEvent -FilterHashtable ...