export sharepoint userlist using powershell
I'm trying to export a list of all our users, specifically the fields name, email and PictureURL'The end goal is to get a list of email adresses for users that dont have a user image. So we can chase...
View ArticleRun Powershell Script as admin server 2012
HiHow can i start a Powershell script from cmd as admin on Server 2012.
View ArticleRegister-PSSessionConfiguration remotely
Hi, I am trying to register session configuration remotely but with no luck. I do not get errors but session still not registered on remote computer. Here is my code: var runspaceConfiguration =...
View Articleforeach problem
hello,i have a ps1 that reads the temp folder of remote computer en displays a list of the size of the folder. to be able to read the temp folder i must have the UNC path to the temp folder of the...
View ArticleAdd users to Office365 with Powershell and a CSV file
For some reason I cant get this to work.I've been using this script for the last two years and now it wont work and I cant figure out why. Can anyone see my mistake?Import-Csv...
View ArticleProblem with contains() method while using with get-AdGroupMember cmdlet
Hello PowerShell Experts, I have a problem with using contain() method with Get-adgroupMember cmdlet. I am using a simple cmdlet to check the member of AD Group.my script contains : $u=(Get-ADUser...
View ArticleUnicode and __LINE__ in PowerShell
I have two questions:1. [Text.Encoding]::Convert([Text.Encoding]::ASCII, [Text.Encoding]::UNICODE, [char[]]"AB") works, but is anything simpler, "compile time" notation, e.g. U"AB" or something...
View ArticleRot13 with numbers
I am trying to increase only numbers in a string of text ..AB12389CD so it becomes AB23490CDso far I have...$a = "AB12389CD" $b = $a[0..$a.Length] foreach ($c in $b){ $e = [string]$c $d =...
View ArticlePowershell Remoting from a TaskScheduler task run under unprivileged user.
Hi,I have a TaskScheduler task configured to run under unprivileged account "shutdownscript"The task starts batch file which in its turn starts powershell script.The script has a lineInvoke-Command...
View ArticleInvoke-command icacls on a remote machine
OK this is a bit complicated to explain but i will try my best i am running a powershell script from my machine which has novell client installed which causes issues with setting windows file...
View ArticleAccess denied when remotely trying with Get-NlbClusterNode
When I locally, on the SMTP Cluster run this command:Get-NlbClusterNode I get the output I need.But if I try the same from a remote server (same network and domain) I get an:[smtp-s001a]: PS...
View Articlehow to enable-wsmancredssp on a remote machine using the invoke command
i want to run enable-wsmancredssp on a remote server while my script is running then when i t has finished disable itbut i cant seem to get the command to work even with the -force switchis this even...
View ArticlePowershell Lastlogon user name
Powershell Lastlogon user nameHow do i determine lastlogon username on remote computeri need only username how do i archive this please assist...Support@Mytechnet.me
View Articleregenerate SQL logins
I'm trying to use PS to enumerate all databases on a sql 2008R2 server and, for each database, generate the corresponding logins and permissions on new domain after migration my server via ADMT. I got...
View Articleget the SQL database users Powershell
Hi!I'm trying to figure out how to get the users of a SQL database using powershell.I have allready figured out how to backup and restore sql databases with powershell but now i want to find what users...
View ArticleChange Lastlogon user Powershell
Hi Team, i need simple script to CHANGE logon name on my new domaini got smth helpfull...
View ArticleDelete permissions on a folder.
Hello everyone, I need to delete all user and group permissions from a folder. Unfortunately Powershell doesn't want to accept my wildcard * to delete everyone. Is there a way to delete everyone's...
View ArticlePowerShell script to initiate installation of WSUS patches
Hello Experts,Is there any way to trigger the pending patches (which are approved by WSUS) on windows servers using powershell.?I researched on this found nothing , Below are the links which I have...
View Articleinvoke-command xml
hello, i have a problem i want to prep my Windows server 2012.So i want to install roles and features. i have a Clixml of the configuration wht the server has to be.My...
View ArticleCreating a country based shortcut on desktop with Powershell gives the same...
I've created the following script that's supposed to create a different shortcut on the desktop based on the value of the "iCountry" key in the registry. The problem is that it always creates the same...
View Article