Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

CPU memory and service status script in powershell has an issue

Hi Everyone,I have powershell script which checks the cpu , memory and services status in many servers.In my script if cpu and memory is above 80% then html table becomes red . It is working fine in...

View Article


Send-Mail Message Office365 "The remote certificate is invalid according to...

Hi,Im trying to send a mail message thrugh Office365. I have read that it should work with Send-MailMessage:Send-MailMessage -Body "Test" -BodyAsHtml -From "..." -To "..." -SmtpServer...

View Article


Need help converting vbscript code used to print a .dotx file into powershell...

Hi.We have an old vbscript we use to print some documents for new users, and I would like to convert it to powershell. Unfortunately, I'm not sure how this part would be written in powershell:Set...

View Article

Get Volume Information For Servers

Hello ForumI'm trying to knock together a script to scan the disk volumes on other Servers and insert the Drive Letter, Drive Type, Drive Size and Drive Free Space into a SQL Table:...

View Article

Generate a GUI progress bar for DISM or ImageX

We are creating a custom recovery environment, and we're almost done. One of the last things we need to do generate a progress bar for either DISM or ImageX that simply displays the progress in a...

View Article


Image may be NSFW.
Clik here to view.

Unable to Install PowerShell V5 preview on Windows 8.1 X64

Over the weekend, I upgraded my laptop to Windows 8.1 Enterprise (with the 8.1 update). All went well but when I go to install the WMF 5.0 preview, i get :I have .NET 4.5 loaded and here's my...

View Article

Invoke-Command : run local function on remote computer

Hi,I've been searching for a while a way to run a local function on a remote computer when using the invoke-command. So I would like to share with you this section of script which could save you a lot...

View Article

Getting users permissions on a folder and sub folders not including the files.

Hello,I am trying to run a script that will, export individual users who have access to the main folder and it's subfolders. Right now this AD power shell script provides the list of only security...

View Article


Extract a number as a statistic

Working with Powershell I'm searching a text file for this line:Run Results: Total MB Processed: 9MB   Total Messages: 2277I'd like to be able to, if found, grab the value for Total Messages as a...

View Article


Replace Office 365 licenses with Powershell

Hi,We are still in the process of running pilot tests and gradually rolling out Service Plans.  We are using ADFS.  I put this short script together to assign limited licenses to members of a security...

View Article

changing a line in multiple batch files

Hi all:I am new to PowerShell and somewhat lost here.I have started a new job cleaning up active directory on a windows 2012r2 environment.They have a couple hundred employees, and they all have a...

View Article

Image may be NSFW.
Clik here to view.

[PowerShell] How to change Windows 10 default web browser to IE using...

Hi All,I encountered an issue regarding how to change Windows 10 default web browser to IE.Currently, I created a C# console application to change RegistryKey to achieve this goal. But failed. In...

View Article

Build numbers for powershell.exe vs. PowerShell version

Hi!I'm looking for information about powershell.exe file build number or version than can allow mi determine installed PowerShell version on remote hosts.Currently I must determine installed version on...

View Article


MountPoint Information

Hello ForumI've just written a PS Script to gather volume information using get-wmiobjectWin32_LogicalDisk to get volume size, free space and status info.  this script gets all the volume information...

View Article

No property inSystem.Management.Automation.PSCustomObject of get-aduser

I got the error said "No property inSystem.Management.Automation.PSCustomObject of get-aduser" when I ran the below scriptimport-module activedirectory $Users = Import-Csv -Path "C:\temp\1.csv"...

View Article


how to replace html table

Hi, I have a html file that I would like to update a particular table every once in awhile. The old table should just be replaced with the new one as the no. of row items change over time. Can someone...

View Article

DSC xpackage resource details

I intend to use DSC to upgrade the version of a particular software using the package dsc resource. The IdentifyingNumber (or product ID as referred by DSC) is the same for the old and the new...

View Article


[Powershell, Excel] Join two arrays to one

Hi All,I am currently working on a proof of concept to import stuff from an Excel file using Powershell. I have created the following:$ExcelFile = "C:\Temp\IP Plan.xlsx" $objExcel = New-Object...

View Article

Image may be NSFW.
Clik here to view.

Unexpected split line and wrong alignment in Help custom-cmdlet -Full in Kor...

The following issue happens for "Help cmdlet -Full" on more Powershell versions 3.0 ... 5.1.The strings are unexpectedly split. And the alignment is not same as English version. See the attached...

View Article

Erro when running a script importing a file - -PowerShell

I am getting the follow error when running the "array" script.Get-WmiObject : A parameter cannot be found that matches parameter name 'ComputerName $strComputer '. At line:3 char:56+ Get-WMIObject...

View Article
Browsing all 21975 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>