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

Remove Obsolete Folders

Good AfternoonAll users currently have access to their own folder on the network and have the base folder structure such as...

View Article


Custom PSobject foreach loop

How can i create a custom object for the below script to pullthe nic bindging status.$objReg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $Server) $objRegKey =...

View Article


Combing Arrays & Hash Table Question

Hello,For some reason, my last post made about an hour ago was deleted? Not sure, but that's kind of frustrating. Anywho, all I'm looking to do here is take 2 arrays with hash tables inside of them and...

View Article

Leading zero(s) in AD attribute gets removed in powershell script

The Active Directory Attribute 'otherHomePhone' is used as an employee ID which can contain leading zeros.  It seems the leading zero's get truncated.  For example: If the employee ID is 003421, the...

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


powershell : Convert decimals time

Hi,Please, How do: convert decimal time? You haven en shorter way to do? Thanks for your help.Arnold$Hours = ([int]“12.6433″ * 100000) / 3600 ‘{0:hh}’ -f [datetime]$Hours $Minutes = ($Hours % 3600) /...

View Article

# The length of day from the sunset to sunrise

Hi,In additive: her is the little scripte.But how is it possible to find the 'Day of Year'?the begine is the : 21.12. yyyy to the next years : 20.12 yyyy of any years?Now i us :...

View Article

Why won't Powershell bring Kiosk users to Sharepoint "viewers" group from...

I am running this command to copy users from Office 365 to Sharepoint: add-spouser -site https://mysite -loginname user@my.email.gov -group "viewers"This works great for users who have E1, E2, and E3...

View Article


PowerShell, RunSpace, Pipeline. I need to use a powershell in my script...

Hi there I thought I would love some help. no matter how hard I Google, and read Endless amout of information this is just not working. I keep hitting a wall with PowerShell, RunSpace and Pipeline....

View Article


Open webpage as active window

When run the following, IE window is open behind PowerShell ISE window. How to bring it to front as active window? Thanks$ie = new-object -com "InternetExplorer.Application"...

View Article

Unexpected token 'Const' in expression or statement. Error

Hi GuysI am trying to use a script to rename a machine with a prefix and then its serial number, so for example I want it to be XXXX-SERIALNUMBERHERE. The script I am using keeps coughing up loads of...

View Article

How to set PreferredAuthenticationProtocol to SAMLP for Office 365 SSO?

I am following the TechNet article, "Set up a trust between Shibboleth and Windows Azure AD", run the following command :Set-MsolDomainAuthentication –DomainName $dom –federationBrandName $dom...

View Article

Find out what primary dns server is being used by powershell in the domain?

I need a powershell script to display the both the pirmary and secondary DNS enteries in the entire domain withouht having to specify a list of server names.Is there anyway to do this?

View Article


how can reset password of bulk users in one time through AD or script?

how can reset password of bulk users in one time through AD or script?

View Article

How to create a alarm pop-up on the screen using powershell (as a reminder at...

I have seen many alarm scripts and stop watch scripts but I need only an alarm script which is similar to our alarm we use at home to wake up in the morning.Could you please help me out at the...

View Article


Powershell script to know who is last user logged onto a particular PC (RDP)....

Case 1:Script To know who is the last logged in on a particular PC without logging in and his details(using powershell)Case 2:Script To know how many users are logged in and what is the...

View Article

Compare characters of filename with text in file

Hi,I have some semicolon-separated files which have the names randomName_FixedName.txt, where the randomName is unique for each file and FixedName.txt is the same for all files.Inside these text...

View Article


Permon Counter Collection Error Handling

I am trying out using poweshell to collect perfmon data from multiple remote servers using this simpler version of Allen Whites script...   param...

View Article

Delete large number of files older than X days

Hi, Im looking for a way to delete a large number of files & directories older than 7 days. It's probably hundreds of thousands of files so every script I´ve tried ends up taking all cpu and...

View Article

Out-GridView not available with -version 2 switch on PowerShell 3.0 engine!

Hello,When I try to access 'Out-GridView' property by launching PowerShell.exe with '-version 2' switch, it giving me the following error message. The development machine is running on Windows 7 ENT...

View Article
Browsing all 21975 articles
Browse latest View live


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