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

Use of SQLSERVER:\SQLPolicy pointing to a specific SQL instance causes...

Running Powershell 3 on W2012 server using SQL Server 2012Within Powershell ISEimport-module"sqlps"-disablenamechecking (Get-ItemSQLSERVER:\SQLPolicy\server1\Instance1).fred()Returns (as...

View Article


Reading a File and Doing ExecuteNonQuery

Here is code snipped which I have written  Write-Host "Came Inside InstallSqlScript method"$scriptContent= Get-Content $sqlScriptLocation | Out-String...

View Article


Remove header from output of pipeline

I am trying to get the update time of the most recent .vhd in a folder.  I have: get-childitem "*.vhd" | sort-object LastWriteTime | Select-Object LastWriteTimeMy issue is I am trying to get rid of the...

View Article

IF Statement help - PowerShell

Hi,I am trying to remove and add a group if a user is a member but the IF STATEMENT is not quite there.  It does not loop through every user in the spreadsheet.  Any assistance would be much...

View Article

Powershell Toolbar GUI "Docking" toolbar

Hi Guys,I have created a powershell script, that is a Toolbar with quick links to programs and to run admin tasks for the network (IE remote assistance, MSTSC, remotely log off etc). I have worked out...

View Article


powershell ise credentials

hellois it possible to store credential on a powershell ise profile to prevent prompt each time i want to use remote connection icon.thank you

View Article

Why won't my script run successfully as a Scheduled Task when it runs...

Hello,My script, which removes SidHistory using Ashley McGlone's (ie. Goatee PFE) code and updates a SQL table, runs fine from within the PS ISE and as a .ps1 file from the ISE prompt.  So I know the...

View Article

Run a Powershell script during system restart

Hi, I'm having the following Powershell script to monitor for a File creation event:$folder = 'D:\LoadTesting2' $filter = 'runTest.bat' $fsw = New-Object IO.FileSystemWatcher $folder, $filter -Property...

View Article


<body onload="javascript:rd();"y do i gat thit on pc

View Article


ActiveWindow.ScrollRow = 1

Excel VBA has ActiveWindow.ScrollRow = 1 that moves the row 1 to the top of the window. How to use it in PS? Thanks

View Article

Possible to loop through $error to search for text?

Hi, i have written a simple powershell script which copies an unique executable to a workstation then executes it.  I'm running an Alienvault SIEM, which uses OSSEC  as a log forwarding agent...

View Article

How to hide all users in a particular OU in the Global Address List.

We are running DirSync and ADFS in our O365 environment. We want to hide all students in our GAL. We know this can be done one user object at a time in ADSIeditor, but does anyone have a method or...

View Article

Weird connetion errors in remote powershell session against exchange online..

Hello Experts - I had this posted here but was asked to post it here. Can someone please help me. Thanks.

View Article


Powershell report different to GUI

HiI have the script below and it almost works it queries the mailboxe size and returns the result sorted by the largest mailbox & emails a report.Problem is when I check the exchange server 2003...

View Article

How to change the static IP Address of a Failover Cluster Instance with...

I found this in the documentation for DHCP , but I am planning to use this machine for a DMZ implementation thus I cannot get away with DHCP? Get-ClusterResource "IP Address 172.24.11.0" |...

View Article


Remove-ADGroupMember where member is in parent domain and group is in child...

I have a parent domain (sandbox.local) and a child domain (child.sandbox.local) and want the capability to add and remove sandbox\User to a (domain local) group in the child domain. I can add the user...

View Article

How can I use PowerShell 3.0 cmdlets or script to list all the local groups...

Using PowerShell 3.0 (And if possible the CIM, not WMI cmdlet), how can I script with | out-file C:\<filename>.txt or .csv option to list all local user accounts & local groups on remote...

View Article


Alternating text color of excel cell items after each space?

Hello. I have a script that emails a table of info which works fine and that looks like this: name, samaccountname, date, memberofIn the email table I was able to have it do a line break on each space...

View Article

Why won't my ntdsutil command execute successfully from my Posh script?

Hello,The purpose of the script is to delete snapshot versions using ntdsutil.The script starts and executes a  '$SnapShotList = ntdsutil snapshot "list all" quit quit' to list current snapshots as...

View Article

Creating new Aliases for all users and future users in O365

Hi, I posted this in Office 365 forums and was guided here. I am trying to find a method to create Alias for all users in Exchange Online. I would like it to be in the format of First letter of first...

View Article
Browsing all 21975 articles
Browse latest View live


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