Quantcast
Channel: The Official Scripting Guys Forum! forum
Browsing all 15028 articles
Browse latest View live

Opening a powershell script from a powershell script

I have 3 power shell scripts i want to launch from my main power shell script.It needs to run in its own PowerShell console but when i try it try's to run them in the main Powershell console.What is...

View Article


HTA Tiltle not hidden when x-ua-compatibility is set to ie=10

Good Evening Everyone,I'm playing around with a login prompt using an HTA and I'm having issues getting the title bar to be hidden. I had to make changes and add the below line to my header so i can...

View Article


Powershell cross domain

I am using Powershell 2.0 on Windows 2008 and 2008 R2 and Win7 boxes.  I have two domains, A and B, domain B trusts A, but A does NOT trust B.  I have a computer on domain A running a Powershell...

View Article

compare objects

I have two different arrays each with two properties for the objects in them. currently the script I have is something like for-each (nested query objects) { $a = .. $b =...$a + $b = [array]$c  $c}...

View Article

facing error.

Hi,when i'm trying to stop the service in remote machine from local. i'm getting as below.Cannot open Service Control Manager on computer 'servername'. This operation might require other...

View Article


Odd error with IF(condition){commands}

In creating my script for WSUS I ran into an error I haven't seen before and spending way too much time trying to figure out why I get this error.  In my IF(condition){commands} segment I get the...

View Article

Export-excel, losing leading 0 upon export

Background:  I have a PowerShell script that imports a txt file as a csv, selects certain fields, and places them in an object.  It then takes the object and filters for certain results using a...

View Article

Active directory AD cleanup. group policies clean

Hello MS PS guru team,Can anybody provide some guidelines, thoughts to perform an AD group policy cleanup through Powershell?Basically, I need to delete group policies that are no longer in use in the...

View Article


Help with script to automate selections in disk cleanup

Hello All,      I use a script to run disk cleanup in task manager(cleanmgr.exe /sagerun:n (where "n" is any number - I use 99)). After I drop this in task manager I then have to manually configure the...

View Article


Image may be NSFW.
Clik here to view.

bulk create AD users in a specific OU given a CSV file

Hello MS team,Based on a powershell script that I found in your website, and build the CSV, and update according to my customer's request, but I am getting an error.Could you please see the error below...

View Article

make a function to calculate a point in coordinates. (javascript or python)

Hello,my situation is as follows, I want to make a method (function) that takes one coordinate (which i would pass the method through the parameters) and x° and xMeters (also parameters of course). The...

View Article

How to get virtual machine NetBIOS names? Can I use powershell to list all...

How to get virtual machine NetBIOS names? Can I use powershell to list all virtual machines hostnames (including linux?)I need a simpls list, a text file, with one hostname/netBIOS name per line, the...

View Article

How to center labels in a flowlayout panel in a Powershell / Winform GUI

In my Powershell GUI, I have in the middle, a tablelayout panel. This TableLayoutPanel have three columns. In the last column, I have a FlowLayout Panel.In this FlowLayout panel I need to add, a random...

View Article


find replace within a text file

add command within an existing batch file to find/replace "M81" TO "M82" text [file extension = .BLS] in a specified folder, then save/replace/overwrite all files containing "M81" within the same folder

View Article

Relative location of a file

I'm using the following statement for a striptoolMenuItem$FileOpen.Image=[System.Drawing.Image]::FromFile("c:\\temp\\Icon\\Preview.png")But I will like to use the relative position when deploy.........

View Article


Powershell Test Sql Connection and go-to-backup

I have a fairly substantial powershell script which for its size is simple in that it opens a SQL connection runs a multitude of queries and exports that data.  It works without issue 99% of the time...

View Article

Run a task on System Shutdown

HelloI have a script that runs once a month and it ask the user to install new updates on their system. The user has an option to choose NO and when that happen, I would like to run the script again...

View Article


Replacing string in a file

I'm trying to match and replace a string in a file that changes daily.  REM Break#1LOI 0712 232400 2324 0004 001 001 000030 000000 00000000 000 00SWIFFER28 0000LOI 0712 232400 2324 0004 001 002 000030...

View Article

batch file will not run properly help please!

I am trying to create a windows batch script that will allow me to deploy preparation updates for Windows 7 64 bit but the script will not launch properly. I have all of the files inside of the same...

View Article

Find the Logon and Logoff Times of a Specific User

HR sometimes want to know the logon and logoff times of specific users. I have been trying to figure out how to use the Powershell Get-Eventlog command to query our DC Security Logs to find entries...

View Article
Browsing all 15028 articles
Browse latest View live


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