Quantcast
Browsing all 21975 articles
Browse latest View live

Convert object to string then to int

Hi all so right now I reading a log file and selecting the line numbers where a certain symbol appears. The symbol is a "/" that appears every day when the script is run. I then store the second line...

View Article


Change html text color inline

Hey all so I have a script the pings some machines and adds them to a html file as well as a log file if I can't reach them. However I want to make the machines that have been offline for more than 3...

View Article


Write-Eventlog -EventID 7036 Description Issue

HiI am attempting to write a service stop event to the system event log. An example of the command s I have been using is:write-eventlog -logname system -source "Service Control Manager" -entrytype...

View Article

Powershell script

Hello,I'm creating a a script to report some information from computer (name, state, free space, etc...) and convert in html file with powershell. It works but I have a problem in html file for each...

View Article

Image may be NSFW.
Clik here to view.

File permissions to excel

Can anyone tell me why this script isn't working?clear-host $Servers = Get-Content("C:\Scripts\NextGen\Servers.txt") $Excel = new-Object -comobject Excel.Application $Excel.visible = $True $Excel =...

View Article


Calling functions and passing parameters

HiI'm starting to use powershell and writing some basic scripts to check disk space.The question I have is that if I use the code below I keep on getting errors at "$diskused=$size-$free"...

View Article

Multiple Get-Wmiobject doesn't work ?

Hi Friends, when i am using multiple Get-wmiobject it provides results only for the first one !!I thought the flow is not reaching till 2nd get-wmiobject and added a write-host which is shown in...

View Article

Image may be NSFW.
Clik here to view.

Exchange 2010 Picture Upload using Remote Powershell

When I first setup Exchange I cobbled together this Powershell command to upload pictures of the employees to display in outlook.  It runs fine when I am logged into the server and open the EMS, paste...

View Article


Simple method to skip errors

Biting the bullet and moving from ds commands to powershell for automating group membership and shadow groups. Due to the fact there are at least 2 bugs I know of, reported years ago with no response...

View Article


Logon script : Invoke other user for management task

Hello,When my user logon, a logon script is run. This logon script should delete a file on the computer. But, the user doesn't have right on that file. I have try this : $pwd = ConvertTo-SecureString...

View Article

Deploy DacPac with DSC suceeded only the first time

I've this simple configuration, when I run the Dsc-StartConfiguration the first time everything goes well, the database gets deployed and all the tables are there.    xDatabase DeployDac     {...

View Article

Excel chart - create second axis

I've created a script which makes an Excel object, takes some data, generates a chart and then exports the chart as a JPG. The thing is it's a CPU report with one series for Mhz and one for % - and...

View Article

Split Strings with Capital Letters and Numbers

HiI have got a Powershell line below that split a string with capital letters into spaces which is great.$test = "OnceUponATime" $test = ($test.substring(0,1).toupper() + $test.substring(1) -creplace...

View Article


Scheduled Jobs, Receive-Job and results in Powershell 3

A job is scheduled to run at logon of the regular user, but using an account of the local administrator. The script is executed from the file and contains/produces errors. For example: *) Join-Path...

View Article

Get Write-Warning outputs

Hey,all of you know the command Write-Error and the Variable $Error which contains the errors that were written. Is this possible with Write-Warning, too? I already read about the parameter...

View Article


Run powershell as scheduled task. Should be simple?

Path to my script is on UNC and contains a space. To run it from powershell windows I have to type:& "\\domain.private\netlogon\Group Scripts\NirvanaRoleMembership.ps1"as apparently, unlike every...

View Article

Installing VM agent using CLI command

I want to install VM agent during VM Creation. I was able to install the agent using New-AzureVM and New-AzureQuickVM Powershell commands. But i want the CLI equivalent of these commands. Please suggest

View Article


Copying Multiple Folders (various servers) to a single location with a CRC or...

Hi Gurus!Any suggestions or insight on how I can do the following.  I need to copy multiple folder locations (and subfolders) from multiple servers to one server with a shared volume that will contain...

View Article

How to allow non-admins to run IPAM powershell cmdlets

On the IPAM Server Cmdlets in Windows PowerShell page in the Technet library it says, "The IPAM module supports the Windows PowerShell configuration file namedMicrosoft.IPAM to allow non-local...

View Article

Help required to manipulate the data without exporting the output twice

I am running a script which export the data to CSV file and I re-import the same file to remove the duplicate rows and them export them.     Need to clean the up the first file after the script...

View Article
Browsing all 21975 articles
Browse latest View live